Skip to content

Commit

Permalink
make: fix VERSION unset if commit has no associated tag
Browse files Browse the repository at this point in the history
  • Loading branch information
pires authored and evan-gray committed Nov 12, 2024
1 parent 6e93914 commit 60c5ffe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ BIN = $(OUT)/bin

-include Makefile.help

VERSION = $(shell git describe --tags --dirty)
# VERSION is the git tag of the current commit if there's a tag, otherwise it's "dev-" plus the git commit sha.
VERSION = $(shell git describe --tags --dirty 2>/dev/null || echo "dev-$(shell git rev-parse --short HEAD)")

.PHONY: dirs
dirs: Makefile
Expand Down

0 comments on commit 60c5ffe

Please sign in to comment.