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

Use goreleaser version if available, otherwise use buildinfo #48

Merged
merged 3 commits into from
Apr 5, 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
10 changes: 5 additions & 5 deletions .github/workflows/.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
name: Generate Man and Completions
run: |
mkdir completion
go run main.go completion bash > completion/bash
go run main.go completion zsh > completion/zsh
go run main.go completion fish > completion/fish
go run main.go completion powershell > completion/powershell
go run *.go completion bash > completion/bash
go run *.go completion zsh > completion/zsh
go run *.go completion fish > completion/fish
go run *.go completion powershell > completion/powershell
mkdir man
go run main.go gendoc --type man
go run *.go gendoc --type man
pwd
ls
-
Expand Down
8 changes: 6 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ func initConfig() {
}
}

func SetVersionInfo(version, commit, date string) {
rootCmd.Version = fmt.Sprintf("%s (Built on %s from Git SHA %s)", version, date, commit)
func SetVersionInfo(version, commit, date string, dirty bool) {
v := fmt.Sprintf("%s (Built on %s from Git SHA %s)", version, date, commit)
if dirty {
v = v + " dirty"
}
rootCmd.Version = v
}
4 changes: 0 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ toolchain go1.21.7

require (
github.com/alessio/shellescape v1.4.2
github.com/carlmjohnson/versioninfo v0.22.5
github.com/google/cel-go v0.20.1
github.com/passbolt/go-passbolt v0.7.0
github.com/pterm/pterm v0.12.79
Expand All @@ -23,10 +22,7 @@ require (
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/ProtonMail/go-mime v0.0.0-20230322103455-7d82a3887f2f // indirect
github.com/ProtonMail/gopenpgp/v2 v2.7.5 // indirect
github.com/aead/argon2 v0.0.0-20180111183520-a87724528b07 // indirect
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/console v1.0.4 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
Expand Down
Loading