Derive the build version from the git tag #12

Merged
FernandoJVideira merged 1 commits from fix/version-from-git-tag into main 2026-10-08 23:11:42 +00:00
Showing only changes of commit ab322b7d91 - Show all commits
+5 -1
View File
@@ -1,5 +1,9 @@
PKG_NAME := git.fernandovideira.com/FernandoJVideira/draft PKG_NAME := git.fernandovideira.com/FernandoJVideira/draft
VERSION := v0.2.0 # Taken from the git tag, so a build can never disagree with the release it was
# cut from: exactly `v0.2.1` on that tag, `v0.2.1-3-g1a2b3c4` three commits
# later, `dev` outside a git checkout (e.g. a source tarball). Override with
# `make build VERSION=v1.2.3`.
VERSION ?= $(shell git describe --tags --always 2>/dev/null || echo dev)
GO_SOURCES := $(shell find . -name '*.go' -not -path './assets/testdata/*') GO_SOURCES := $(shell find . -name '*.go' -not -path './assets/testdata/*')
.PHONY: version build windows win-arm linux mac prepare-embed clean .PHONY: version build windows win-arm linux mac prepare-embed clean