Skip to content

Commit

Permalink
[Automation] Bump Go version to 1.24.0 (#98)
Browse files Browse the repository at this point in the history
Update builds and documentation to use Go 1.24.0.

Bump the version of golangci-lint used on CI from 1.60 to 1.64.
  • Loading branch information
andrewkroh authored Feb 12, 2025
1 parent bc7bb60 commit cb99f14
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
go-version: '1.24.x'

- name: cross build with goreleaser
uses: goreleaser/goreleaser-action@v6
Expand All @@ -48,7 +48,7 @@ jobs:
- name: set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
go-version: '1.24.x'

- name: go test
run: go test -timeout 15m ./...
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.23.x'
go-version: '1.24.x'

- uses: actions/checkout@v4

Expand All @@ -36,4 +36,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60
version: v1.64
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
go-version: '1.24.x'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ examples for common shells.

bash:

`eval "$(gvm 1.23.6)"`
`eval "$(gvm 1.24.0)"`

cmd.exe (for batch scripts `%i` should be substituted with `%%i`):

`FOR /f "tokens=*" %i IN ('"gvm.exe" 1.23.6') DO %i`
`FOR /f "tokens=*" %i IN ('"gvm.exe" 1.24.0') DO %i`

powershell:

`gvm --format=powershell 1.23.6 | Invoke-Expression`
`gvm --format=powershell 1.24.0 | Invoke-Expression`

gvm flags can be set via environment variables by setting `GVM_<flag>`. For
example `--http-timeout` can be set via `GVM_HTTP_TIMEOUT=10m`.
Expand All @@ -36,7 +36,7 @@ Linux (amd64):
# Linux Example (assumes ~/bin is in PATH).
curl -sL -o ~/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-linux-amd64
chmod +x ~/bin/gvm
eval "$(gvm 1.23.6)"
eval "$(gvm 1.24.0)"
go version
```

Expand All @@ -46,7 +46,7 @@ Linux (arm64):
# Linux Example (assumes ~/bin is in PATH).
curl -sL -o ~/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-linux-arm64
chmod +x ~/bin/gvm
eval "$(gvm 1.23.6)"
eval "$(gvm 1.24.0)"
go version
```

Expand All @@ -56,7 +56,7 @@ macOS (universal):
# macOS Example
curl -sL -o /usr/local/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-darwin-all
chmod +x /usr/local/bin/gvm
eval "$(gvm 1.23.6)"
eval "$(gvm 1.24.0)"
go version
```

Expand All @@ -65,13 +65,13 @@ Windows (PowerShell):
```
[Net.ServicePointManager]::SecurityProtocol = "tls12"
Invoke-WebRequest -URI https://github.com/andrewkroh/gvm/releases/download/v0.5.2/gvm-windows-amd64.exe -Outfile C:\Windows\System32\gvm.exe
gvm --format=powershell 1.23.6 | Invoke-Expression
gvm --format=powershell 1.24.0 | Invoke-Expression
go version
```

Fish Shell:

Use `gvm` with fish shell by executing `gvm 1.23.6 | source` in lieu of using `eval`.
Use `gvm` with fish shell by executing `gvm 1.24.0 | source` in lieu of using `eval`.

For existing Go users:

Expand Down
6 changes: 3 additions & 3 deletions cmd/gvm/gvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ binary versions of Go from https://storage.googleapis.com/golang. Below are
examples for common shells.
bash:
eval "$(gvm 1.21.0)"
eval "$(gvm 1.24.0)"
batch (windows cmd.exe):
FOR /f "tokens=*" %i IN ('"gvm.exe" 1.21.0') DO %i
FOR /f "tokens=*" %i IN ('"gvm.exe" 1.24.0') DO %i
powershell:
gvm --format=powershell 1.21.0 | Invoke-Expression
gvm --format=powershell 1.24.0 | Invoke-Expression
gvm flags can be set via environment variables by setting GVM_<flag>. For
example --http-timeout can be set via GVM_HTTP_TIMEOUT=10m.
Expand Down
2 changes: 1 addition & 1 deletion cmd/gvm/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func installCommand(cmd *kingpin.CmdClause) func(*gvm.Manager) error {
var version string
var build bool
cmd.Flag("build", "Build go version from source").Short('b').BoolVar(&build)
cmd.Arg("version", "Go version to install (e.g. 1.21.0).").StringVar(&version)
cmd.Arg("version", "Go version to install (e.g. 1.24.0).").StringVar(&version)

return func(manager *gvm.Manager) error {
if version == "" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/gvm/use.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type useCmd struct {
func useCommand(cmd *kingpin.CmdClause) func(*gvm.Manager) error {
ctx := &useCmd{}

cmd.Arg("version", "Go version to install (e.g. 1.21.0).").StringVar(&ctx.version)
cmd.Arg("version", "Go version to install (e.g. 1.24.0).").StringVar(&ctx.version)
cmd.Flag("build", "Build go version from source").Short('b').BoolVar(&ctx.build)
cmd.Flag("no-install", "Don't install if missing").Short('n').BoolVar(&ctx.noInstall)
cmd.Flag("format", "Format to use for the shell commands. Options: bash, batch, powershell").
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/andrewkroh/gvm

go 1.23
go 1.24

require (
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
Expand Down

0 comments on commit cb99f14

Please sign in to comment.