Skip to content

Commit

Permalink
Update to latest goreleaser (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
chokoswitch authored Dec 2, 2024
1 parent e38ffc1 commit 7147452
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version-file: go.work
# Match goreleaser's Go version
go-version: 1.23
cache-dependency-path: |
**/go.sum
build/versions.go
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ linters-settings:
sections:
- standard
- default
- prefix(github.com/curioswitch/go-build)
- prefix(github.com/curioswitch/go-reassign)

issues:
exclude-rules:
Expand Down
3 changes: 2 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 2
builds:
- main: ./cmd
env:
Expand All @@ -18,7 +19,7 @@ release:
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
version_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
Expand Down
3 changes: 2 additions & 1 deletion analyzer.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package reassign

import (
"github.com/curioswitch/go-reassign/internal/analyzer"
"golang.org/x/tools/go/analysis"

"github.com/curioswitch/go-reassign/internal/analyzer"
)

const FlagPattern = analyzer.FlagPattern
Expand Down
2 changes: 1 addition & 1 deletion build/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ go 1.22.1

require (
github.com/curioswitch/go-build v0.1.0
github.com/goyek/goyek/v2 v2.2.0
github.com/goyek/x v0.2.0
)

require (
github.com/fatih/color v1.17.0 // indirect
github.com/goyek/goyek/v2 v2.2.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-shellwords v1.0.12 // indirect
Expand Down
7 changes: 3 additions & 4 deletions build/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package main
import (
"fmt"

"github.com/curioswitch/go-build"
"github.com/goyek/goyek/v2"
"github.com/goyek/x/boot"
"github.com/goyek/x/cmd"

"github.com/curioswitch/go-build"
)

func main() {
Expand All @@ -16,14 +15,14 @@ func main() {
goyek.Define(goyek.Task{
Name: "snapshot",
Action: func(a *goyek.A) {
cmd.Exec(a, fmt.Sprintf("go run github.com/goreleaser/goreleaser@%s release --snapshot --rm-dist", verGoReleaser))
cmd.Exec(a, fmt.Sprintf("go run github.com/goreleaser/goreleaser/v2@%s release --snapshot --clean", verGoReleaser))
},
})

goyek.Define(goyek.Task{
Name: "releasea",
Action: func(a *goyek.A) {
cmd.Exec(a, fmt.Sprintf("go run github.com/goreleaser/goreleaser@%s release --rm-dist", verGoReleaser))
cmd.Exec(a, fmt.Sprintf("go run github.com/goreleaser/goreleaser/v2@%s release --clean", verGoReleaser))
},
})

Expand Down
2 changes: 1 addition & 1 deletion build/versions.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package main

const verGoReleaser = "v1.10.3"
const verGoReleaser = "v2.4.8"
3 changes: 2 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package main

import (
"github.com/curioswitch/go-reassign/internal/analyzer"
"golang.org/x/tools/go/analysis/singlechecker"

"github.com/curioswitch/go-reassign/internal/analyzer"
)

func main() {
Expand Down

0 comments on commit 7147452

Please sign in to comment.