Skip to content

Commit

Permalink
try to fix goreleaser version
Browse files Browse the repository at this point in the history
  • Loading branch information
pnsafonov committed Apr 27, 2024
1 parent 579d240 commit d340bf4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ before:
hooks:
- go mod download

release:
draft: false
#release:
# draft: false

builds:
- env:
Expand Down
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ import (
"strings"
)

var (
version = "dev"
commit = "none"
date = "unknown"
builtBy = "manual"
)

func main() {
doMain(os.Args)
}
Expand Down
11 changes: 1 addition & 10 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,6 @@ import (
"runtime/debug"
)

var (
version = "dev"
commit = commitNone
date = "unknown"
builtBy = "manual"
)

const commitNone = "none"

func GetVersion0() (string, string) {
version0 := GetVersion()
gitHash := GetGitHash()
Expand All @@ -25,7 +16,7 @@ func GetVersion() string {
}

func GetGitHash() string {
if commit != commitNone {
if commit != "none" {
return commit
}

Expand Down

0 comments on commit d340bf4

Please sign in to comment.