This commit is contained in:
parent
c0e975e139
commit
6f79719919
@ -17,6 +17,10 @@ builds:
|
||||
ignore:
|
||||
- goos: windows
|
||||
goarch: "386"
|
||||
# Custom ldflags templates.
|
||||
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
|
||||
ldflags:
|
||||
- -s -w -X github.com/abs3ntdev/haunt/cmd.Version={{.Version}}
|
||||
|
||||
archives:
|
||||
- format: tar.gz
|
||||
|
@ -4,10 +4,9 @@ pipeline:
|
||||
commands:
|
||||
- go mod tidy
|
||||
- go build -o bin/haunt
|
||||
- mkdir completions
|
||||
- ./bin/haunt completion zsh > completions/haunt_zsh
|
||||
- ./bin/haunt completion bash > completions/haunt_bash
|
||||
- ./bin/haunt completion fish > completions/haunt_fish
|
||||
when:
|
||||
event: push
|
||||
|
||||
publish:
|
||||
image: goreleaser/goreleaser
|
||||
commands:
|
||||
|
@ -7,6 +7,8 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var Version = "dev"
|
||||
|
||||
// versionCmd represents the version command
|
||||
var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
@ -37,5 +39,5 @@ func init() {
|
||||
// Version print current version
|
||||
func version(cmd *cobra.Command, args []string) {
|
||||
r := haunt.NewHaunt()
|
||||
log.Println(r.Prefix(haunt.Green.Bold(haunt.RVersion)))
|
||||
log.Println(r.Prefix(haunt.Green.Bold(Version)))
|
||||
}
|
||||
|
@ -18,8 +18,6 @@ import (
|
||||
var (
|
||||
// RPrefix tool name
|
||||
RPrefix = "haunt"
|
||||
// RVersion current version
|
||||
RVersion = "v0.1.3"
|
||||
// RExt file extension
|
||||
RExt = ".yaml"
|
||||
// RFile config file name
|
||||
|
Loading…
Reference in New Issue
Block a user