Skip to content

Commit

Permalink
Fixing version generation
Browse files Browse the repository at this point in the history
  • Loading branch information
dkyanakiev authored and Dimitar Yanakiev committed Mar 14, 2024
1 parent 95d78f9 commit f799b50
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [0.1.3] - 2024-03-14

## Fixed

- Dynamic version passed when building the binary.

## [0.1.2] - 2024-03-13

## Added
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dev: ## Build for the current development version

.PHONY: build
build:
go build -o bin/vaul7y ./cmd/vaul7y
go build -ldflags "-X main.version=`git tag --sort=-version:refname | head -n 1`" -o bin/vaul7y ./cmd/vaul7y

.PHONY: run
run:
Expand Down
4 changes: 2 additions & 2 deletions cmd/vaul7y/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/rivo/tview"
)

var version = "0.1.0"
var version = "dev"

type options struct {
Version bool `short:"v" long:"version" description:"Show Damon version"`
Expand All @@ -34,7 +34,7 @@ func main() {
}

if opts.Version {
fmt.Println("vaul7y", version)
fmt.Println("vaul7y", strings.TrimPrefix(version, "v"))
os.Exit(0)
}

Expand Down

0 comments on commit f799b50

Please sign in to comment.