Skip to content

Commit

Permalink
Let goreleaser handle versions
Browse files Browse the repository at this point in the history
  • Loading branch information
george-angel committed Aug 23, 2021
1 parent e41d24e commit 6ed220a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,3 @@ test: build-test-image

bench:
go test -bench=.

release:
@sd "const version = \"dev\"" "const version = \"$(VERSION)\"" strongbox.go
@git add -- strongbox.go
@git commit -m "Release $(VERSION)"
@sd "const version = \"$(VERSION)\"" "const version = \"dev\"" strongbox.go
@git add -- strongbox.go
@git commit -m "Clean up release $(VERSION)"
9 changes: 6 additions & 3 deletions strongbox.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ import (
"github.com/jacobsa/crypto/siv"
)

const version = "dev"

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

keyLoader = key
kr keyRing
prefix = []byte("# STRONGBOX ENCRYPTED RESOURCE ;")
Expand Down Expand Up @@ -62,7 +65,7 @@ func main() {
flag.Parse()

if *flagVersion || (flag.NArg() == 1 && flag.Arg(0) == "version") {
fmt.Println(version)
fmt.Printf("version=%s commit=%s date=%s builtBy=%s", version, commit, date, builtBy)
return
}

Expand Down

0 comments on commit 6ed220a

Please sign in to comment.