Skip to content

Commit 059befe

Browse files
Update dependencies (#1295)
* update go to 1.22.0 * update goreleaser/goreleaser to v5 * Update goreleaser to latest * update linter * update go-git
1 parent a8b464c commit 059befe

File tree

10 files changed

+147
-143
lines changed

10 files changed

+147
-143
lines changed

.github/workflows/release.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ jobs:
1919
- name: Set up Go
2020
uses: actions/setup-go@v5
2121
with:
22-
go-version: 1.19
22+
go-version: 1.22.0
2323
- name: Run GoReleaser
24-
uses: goreleaser/goreleaser-action@v5
24+
uses: goreleaser/goreleaser-action@v6
2525
with:
26-
version: v0.184.0
27-
args: release -f .goreleaser/mac.yml --rm-dist
26+
distribution: goreleaser
27+
version: "~> v2"
28+
args: release -f .goreleaser/mac.yml --clean
2829
env:
2930
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3031
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
@@ -52,12 +53,13 @@ jobs:
5253
- name: Set up Go
5354
uses: actions/setup-go@v5
5455
with:
55-
go-version: 1.19
56+
go-version: 1.22.0
5657
- name: Run GoReleaser
57-
uses: goreleaser/goreleaser-action@v5
58+
uses: goreleaser/goreleaser-action@v6
5859
with:
59-
version: v0.184.0
60-
args: release -f .goreleaser/linux.yml --rm-dist
60+
distribution: goreleaser
61+
version: "~> v2"
62+
args: release -f .goreleaser/linux.yml --clean
6163
env:
6264
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6365
ARTIFACTORY_SECRET: ${{ secrets.ARTIFACTORY_SECRET }}
@@ -72,12 +74,13 @@ jobs:
7274
- name: Set up Go
7375
uses: actions/setup-go@v5
7476
with:
75-
go-version: 1.19
77+
go-version: 1.22.0
7678
- name: Run GoReleaser
77-
uses: goreleaser/goreleaser-action@v2
79+
uses: goreleaser/goreleaser-action@v6
7880
with:
79-
version: v0.184.0
80-
args: release -f .goreleaser/windows.yml --rm-dist
81+
distribution: goreleaser
82+
version: "~> v2"
83+
args: release -f .goreleaser/windows.yml --clean
8184
env:
8285
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8386
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}

.github/workflows/test-snapshot.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,15 @@ jobs:
3333
- name: Set up Docker Buildx
3434
uses: docker/setup-buildx-action@v2
3535
- name: Set up Go
36-
uses: actions/setup-go@v2
36+
uses: actions/setup-go@v5
3737
with:
38-
go-version: 1.19
38+
go-version: 1.22.0
3939
- name: Run GoReleaser Snapshot
40-
uses: goreleaser/goreleaser-action@v2
40+
uses: goreleaser/goreleaser-action@v6
4141
with:
42-
version: v0.184.0
43-
args: release -f .goreleaser/linux.yml --rm-dist --snapshot
42+
distribution: goreleaser
43+
version: "~> v2"
44+
args: release -f .goreleaser/linux.yml --clean --snapshot
4445
env:
4546
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4647
ARTIFACTORY_SECRET: ${{ secrets.ARTIFACTORY_SECRET }}

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
test:
55
strategy:
66
matrix:
7-
go-version: [1.19.x]
7+
go-version: [1.22.0]
88
platform: [ubuntu-latest, macos-latest, windows-latest]
99
runs-on: ${{ matrix.platform }}
1010
steps:
@@ -37,7 +37,7 @@ jobs:
3737
- name: golangci-lint
3838
uses: golangci/golangci-lint-action@v6
3939
with:
40-
version: v1.48
40+
version: v1.63.4
4141
- name: Run Tests
4242
run: make ci
4343
shell: bash

.golangci.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ linters:
55
disable-all: true
66
enable:
77
- bodyclose
8-
- deadcode
98
- depguard
109
- dogsled
1110
- dupl
@@ -20,21 +19,35 @@ linters:
2019
- ineffassign
2120
- misspell
2221
- nakedret
23-
- revive
22+
# - revive -- TODO: reenable after fixing errors
2423
# - rowserrcheck -- disabled because of https://github.com/golangci/golangci-lint/issues/2649
2524
- staticcheck
2625
# - structcheck -- disabled because of https://github.com/golangci/golangci-lint/issues/2649
2726
- typecheck
2827
- unconvert
2928
- unused
30-
- varcheck
3129
- whitespace
3230

3331
linters-settings:
32+
depguard:
33+
rules:
34+
main:
35+
list-mode: lax
36+
allow:
37+
- $all
38+
deny: []
3439
goimports:
3540
local-prefixes: github.com/stripe/stripe-cli
41+
govet:
42+
disable:
43+
- printf
3644
misspell:
3745
locale: US
46+
staticcheck:
47+
checks:
48+
- all
49+
- -SA1006
50+
- -SA1019
3851

3952
issues:
4053
exclude-rules:

.goreleaser/linux.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
env:
23
- GO111MODULE=on
34
before:
@@ -29,10 +30,11 @@ builds:
2930
goarch:
3031
- arm64
3132
archives:
32-
- replacements:
33-
linux: linux
34-
386: i386
35-
amd64: x86_64
33+
- name_template: >-
34+
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_
35+
{{- if eq .Arch "386" }}i386
36+
{{- else if eq .Arch "amd64" }}x86_64
37+
{{- else }}{{ .Arch }}{{ end }}
3638
files:
3739
- none*
3840
changelog:
@@ -44,7 +46,7 @@ changelog:
4446
checksum:
4547
name_template: "{{ .ProjectName }}-linux-checksums.txt"
4648
snapshot:
47-
name_template: "{{ .Tag }}-next"
49+
version_template: "{{ .Version }}-next"
4850
nfpms:
4951
- id: deb
5052
package_name: stripe

.goreleaser/mac.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
env:
23
- GO111MODULE=on
34
before:
@@ -29,9 +30,12 @@ builds:
2930
goarch:
3031
- arm64
3132
archives:
32-
- replacements:
33-
darwin: mac-os
34-
amd64: x86_64
33+
- name_template: >-
34+
{{ .ProjectName }}_{{ .Version }}_
35+
{{- if eq .Os "darwin"}}mac-os
36+
{{- else }}{{ .Os }}{{end}}_
37+
{{- if eq .Arch "amd64" }}x86_64
38+
{{- else }}{{ .Arch }}{{ end }}
3539
files:
3640
- none*
3741
changelog:
@@ -43,9 +47,9 @@ changelog:
4347
checksum:
4448
name_template: "{{ .ProjectName }}-mac-checksums.txt"
4549
snapshot:
46-
name_template: "{{ .Tag }}-next"
50+
version_template: "{{ .Version }}-next"
4751
brews:
48-
- tap:
52+
- repository:
4953
owner: stripe
5054
name: homebrew-stripe-cli
5155
token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" # This token can access the repo, but GITHUB_TOKEN cannot

.goreleaser/windows.yml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
version: 2
12
env:
23
- GO111MODULE=on
34
before:
@@ -21,13 +22,14 @@ builds:
2122
- amd64
2223
- 386
2324
archives:
24-
- replacements:
25-
windows: windows
26-
386: i386
27-
amd64: x86_64
25+
- name_template: >-
26+
{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_
27+
{{- if eq .Arch "386" }}i386
28+
{{- else if eq .Arch "amd64" }}x86_64
29+
{{- else }}{{ .Arch }}{{ end }}
2830
format_overrides:
2931
- goos: windows
30-
format: zip
32+
formats: zip
3133
files:
3234
- none*
3335
changelog:
@@ -39,15 +41,15 @@ changelog:
3941
checksum:
4042
name_template: "{{ .ProjectName }}-windows-checksums.txt"
4143
snapshot:
42-
name_template: "{{ .Tag }}-next"
43-
scoop:
44-
bucket:
45-
owner: stripe
46-
name: scoop-stripe-cli
47-
token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" # This token can access the repo, but GITHUB_TOKEN cannot
48-
commit_author:
49-
name: stripe-ci
50-
51-
homepage: https://stripe.com
52-
description: Stripe CLI utility
53-
license: Apache 2.0
44+
version_template: "{{ .Version }}-next"
45+
scoops:
46+
- repository:
47+
owner: stripe
48+
name: scoop-stripe-cli
49+
token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}" # This token can access the repo, but GITHUB_TOKEN cannot
50+
commit_author:
51+
name: stripe-ci
52+
53+
homepage: https://stripe.com
54+
description: Stripe CLI utility
55+
license: Apache 2.0

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PROTOC_FAILURE_MESSAGE="\nFailed to compile protobuf files: protoc exited with c
66
export GO111MODULE := on
77
export GOBIN := $(shell pwd)/bin
88
export PATH := $(GOBIN):$(PATH)
9-
export GOLANGCI_LINT_VERSION := v1.48.0
9+
export GOLANGCI_LINT_VERSION := v1.63.4
1010

1111
# Install all the build and lint dependencies
1212
setup:

go.mod

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/stripe/stripe-cli
22

3-
go 1.19
3+
go 1.22.0
44

55
require (
66
github.com/BurntSushi/toml v1.2.0
@@ -23,21 +23,21 @@ require (
2323
github.com/otiai10/copy v1.7.0
2424
github.com/pelletier/go-toml v1.9.5 // indirect
2525
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
26-
github.com/sirupsen/logrus v1.9.0
26+
github.com/sirupsen/logrus v1.9.3
2727
github.com/spf13/afero v1.9.2
2828
github.com/spf13/cast v1.5.0 // indirect
2929
github.com/spf13/cobra v1.5.0
3030
github.com/spf13/pflag v1.0.5
3131
github.com/spf13/viper v1.12.0
32-
github.com/stretchr/testify v1.9.0
32+
github.com/stretchr/testify v1.10.0
3333
github.com/tidwall/gjson v1.14.2
3434
github.com/tidwall/pretty v1.2.0
3535
github.com/x-cray/logrus-prefixed-formatter v0.5.2
3636
github.com/xanzy/ssh-agent v0.3.3 // indirect
37-
golang.org/x/crypto v0.21.0 // indirect
38-
golang.org/x/net v0.23.0 // indirect
39-
golang.org/x/sys v0.18.0
40-
golang.org/x/term v0.18.0
37+
golang.org/x/crypto v0.32.0 // indirect
38+
golang.org/x/net v0.34.0 // indirect
39+
golang.org/x/sys v0.29.0
40+
golang.org/x/term v0.28.0
4141
google.golang.org/grpc v1.63.2
4242
google.golang.org/protobuf v1.33.0
4343
gopkg.in/ini.v1 v1.67.0 // indirect
@@ -46,37 +46,35 @@ require (
4646

4747
require (
4848
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d
49-
github.com/go-git/go-git/v5 v5.12.0
49+
github.com/go-git/go-git/v5 v5.13.0
5050
github.com/hashicorp/go-hclog v1.2.2
5151
github.com/hashicorp/go-plugin v1.4.4
5252
github.com/joho/godotenv v1.4.0
5353
)
5454

5555
require (
56-
dario.cat/mergo v1.0.0 // indirect
56+
dario.cat/mergo v1.0.1 // indirect
5757
github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect
58-
github.com/ProtonMail/go-crypto v1.0.0 // indirect
59-
github.com/cloudflare/circl v1.3.7 // indirect
60-
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
58+
github.com/ProtonMail/go-crypto v1.1.5 // indirect
59+
github.com/cloudflare/circl v1.5.0 // indirect
60+
github.com/cyphar/filepath-securejoin v0.4.0 // indirect
6161
github.com/danieljoos/wincred v1.1.2 // indirect
6262
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
6363
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
64-
github.com/go-git/go-billy/v5 v5.5.0 // indirect
64+
github.com/go-git/go-billy/v5 v5.6.2 // indirect
6565
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
66-
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
66+
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
6767
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
6868
github.com/mtibben/percent v0.2.1 // indirect
69-
github.com/pjbgf/sha1cd v0.3.0 // indirect
70-
github.com/skeema/knownhosts v1.2.2 // indirect
71-
golang.org/x/mod v0.12.0 // indirect
72-
golang.org/x/tools v0.13.0 // indirect
69+
github.com/pjbgf/sha1cd v0.3.2 // indirect
70+
github.com/skeema/knownhosts v1.3.0 // indirect
7371
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
7472
gopkg.in/yaml.v3 v3.0.1 // indirect
7573
)
7674

7775
require (
7876
github.com/99designs/keyring v1.2.1
79-
github.com/Microsoft/go-winio v0.6.1 // indirect
77+
github.com/Microsoft/go-winio v0.6.2 // indirect
8078
github.com/chzyer/readline v1.5.1 // indirect
8179
github.com/davecgh/go-spew v1.1.1 // indirect
8280
github.com/emirpasic/gods v1.18.1 // indirect
@@ -98,6 +96,6 @@ require (
9896
github.com/spf13/jwalterweatherman v1.1.0 // indirect
9997
github.com/subosito/gotenv v1.4.0 // indirect
10098
github.com/tidwall/match v1.1.1 // indirect
101-
golang.org/x/text v0.14.0 // indirect
99+
golang.org/x/text v0.21.0 // indirect
102100
gopkg.in/warnings.v0 v0.1.2 // indirect
103101
)

0 commit comments

Comments
 (0)