Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: upgrade ci to go 1.23 #399

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: '1.23'

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: '1.23'
check-latest: true
cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: '1.23'
check-latest: true
cache: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: '1.23'
cache: true
check-latest: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: '1.23'
cache: true
check-latest: true

Expand Down
9 changes: 3 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ linters:
disable-all: true
enable:
- bodyclose
- exportloopref
- exhaustive
- goconst
- gofmt
- goprintffuncname
# - gosec
# - gosec
- gosimple
- govet
- ineffassign
Expand Down Expand Up @@ -60,11 +59,9 @@ linters-settings:
- "Prefix(github.com/FriendsOfShopware/shopware-cli)"

issues:
exclude-dirs:
- version
exclude-rules:
- path: cmd\/*
linters:
- forbidigo

run:
skip-dirs:
- version
2 changes: 1 addition & 1 deletion account-api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (*Client) doRequest(request *http.Request) ([]byte, error) {
}

if resp.StatusCode >= 400 {
return nil, fmt.Errorf(string(data))
return nil, fmt.Errorf(string(data)+", got status code %d", resp.StatusCode)
}

return data, nil
Expand Down
2 changes: 1 addition & 1 deletion account-api/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func fetchMemberships(ctx context.Context, token token) ([]Membership, error) {
}

if resp.StatusCode != 200 {
return nil, fmt.Errorf(string(data))
return nil, fmt.Errorf(string(data)+" but got status code %d", resp.StatusCode)
}

var companies []Membership
Expand Down
4 changes: 2 additions & 2 deletions cmd/project/project_proxy.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package project

import (
"fmt"
"errors"
"os"
"os/exec"
"runtime"
Expand Down Expand Up @@ -35,7 +35,7 @@ var projectProxyCmd = &cobra.Command{
message += "See cloudflare for more information: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/installation"
}

return fmt.Errorf(message)
return errors.New(message)
}

logging.FromContext(cobraCmd.Context()).Infof("Make sure you have set TRUSTED_PROXIES=127.0.0.1,::1 inside your .env file")
Expand Down
2 changes: 1 addition & 1 deletion extension/asset_platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func InstallNPMDependencies(path string, packageJsonData NpmPackage, additionalP
}
}

if isProductionMode && (packageJsonData.Dependencies == nil || len(packageJsonData.Dependencies) == 0) {
if isProductionMode && len(packageJsonData.Dependencies) == 0 {
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/FriendsOfShopware/shopware-cli

go 1.21
go 1.23

require (
dario.cat/mergo v1.0.1
Expand Down
Loading