From b97e698325974bb8c903a94deda9340f7ed38087 Mon Sep 17 00:00:00 2001 From: Alessio Treglia Date: Fri, 29 Dec 2023 05:23:00 +0100 Subject: [PATCH] try fix goreleaser --- .github/workflows/release.yml | 2 +- .goreleaser.yaml | 1 - cmd/elvoke/main.go | 3 +-- cmd/mcd/main.go | 3 +-- cmd/pathctl/main.go | 2 +- cmd/portup/main.go | 3 +-- cmd/seq/main.go | 2 +- {internal/version => version}/.gitignore | 0 {internal/version => version}/generate_version.sh | 0 {internal/version => version}/version.go | 6 +++--- 10 files changed, 9 insertions(+), 13 deletions(-) rename {internal/version => version}/.gitignore (100%) rename {internal/version => version}/generate_version.sh (100%) rename {internal/version => version}/version.go (80%) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d500ff5..d139561 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - run: git fetch --force --tags - uses: actions/setup-go@v4 with: - go-version: stable + go-version: '1.21' - uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 8fc28c1..652d0bf 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -3,7 +3,6 @@ before: hooks: - make distclean - go mod verify - - go mod tidy - go generate ./... gomod: diff --git a/cmd/elvoke/main.go b/cmd/elvoke/main.go index b6d0292..4c2f2ea 100644 --- a/cmd/elvoke/main.go +++ b/cmd/elvoke/main.go @@ -1,6 +1,7 @@ package main import ( + "al.essio.dev/pkg/tools/version" "crypto/sha256" "flag" "fmt" @@ -11,8 +12,6 @@ import ( "path/filepath" "strings" "time" - - "al.essio.dev/pkg/tools/internal/version" ) var ( diff --git a/cmd/mcd/main.go b/cmd/mcd/main.go index f2a22d1..8f83655 100644 --- a/cmd/mcd/main.go +++ b/cmd/mcd/main.go @@ -1,12 +1,11 @@ package main import ( + "al.essio.dev/pkg/tools/version" "flag" "fmt" "log" "os" - - "al.essio.dev/pkg/tools/internal/version" ) var ( diff --git a/cmd/pathctl/main.go b/cmd/pathctl/main.go index 6ca8c15..56e29ee 100644 --- a/cmd/pathctl/main.go +++ b/cmd/pathctl/main.go @@ -1,13 +1,13 @@ package main import ( + "al.essio.dev/pkg/tools/version" "flag" "fmt" "log" "os" "strings" - "al.essio.dev/pkg/tools/internal/version" "al.essio.dev/pkg/tools/pathlist" ) diff --git a/cmd/portup/main.go b/cmd/portup/main.go index 3e1e872..551c074 100644 --- a/cmd/portup/main.go +++ b/cmd/portup/main.go @@ -1,6 +1,7 @@ package main import ( + "al.essio.dev/pkg/tools/version" "flag" "fmt" "io" @@ -8,8 +9,6 @@ import ( "os" "os/exec" "strings" - - "al.essio.dev/pkg/tools/internal/version" ) const ( diff --git a/cmd/seq/main.go b/cmd/seq/main.go index 6fe0171..1dec122 100644 --- a/cmd/seq/main.go +++ b/cmd/seq/main.go @@ -1,6 +1,7 @@ package main import ( + "al.essio.dev/pkg/tools/version" "flag" "fmt" "log" @@ -9,7 +10,6 @@ import ( "strings" "al.essio.dev/pkg/tools/internal/seq" - "al.essio.dev/pkg/tools/internal/version" ) var ( diff --git a/internal/version/.gitignore b/version/.gitignore similarity index 100% rename from internal/version/.gitignore rename to version/.gitignore diff --git a/internal/version/generate_version.sh b/version/generate_version.sh similarity index 100% rename from internal/version/generate_version.sh rename to version/generate_version.sh diff --git a/internal/version/version.go b/version/version.go similarity index 80% rename from internal/version/version.go rename to version/version.go index ac86c47..568b83c 100644 --- a/internal/version/version.go +++ b/version/version.go @@ -9,10 +9,10 @@ import ( //go:generate bash generate_version.sh //go:embed version.txt -var Version string +var version string func Short() string { - return fmt.Sprintf("unixtools %s", Version) + return fmt.Sprintf("unixtools %s", version) } func PrintWithCopyright() { @@ -20,5 +20,5 @@ func PrintWithCopyright() { } func longWithCopyright() string { - return fmt.Sprintf("alessio's unixtools, version %s\nCopyright (C) 2020, 2021, 2022, 2023 Alessio Treglia ", strings.TrimSpace(Version)) + return fmt.Sprintf("alessio's unixtools, version %s\nCopyright (C) 2020, 2021, 2022, 2023 Alessio Treglia ", strings.TrimSpace(version)) }