Give development builds their own Debian package version
make deb versions a build that isn't a release after the last tag: 0.2.0~rc.1+git3.gca0f148, plus the build time (.m<UTC time>) with uncommitted changes. apt sorts it after that RC and before the next, so installing it over the RC or an older build is an upgrade and needs no --reinstall. mkdeb.sh removes older packages of the same architecture from dist/ so the install globs match one package. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
fb1ee09250
commit
e1bcb5d479
4 files changed
+28
-2
No files matched your search
@@ -41,9 +41,18 @@ DESTDIR ?=
|
||||
JARLD_BIN ?= bin/jarld
|
||||
JARL_BIN ?= bin/jarl
|
||||
|
||||
# make deb: the package's architecture (Debian name) and version.
|
||||
# make deb: the package's architecture (Debian name) and version. A
|
||||
# release is VERSION with ~ for - (0.2.0-rc.1 -> 0.2.0~rc.1, which apt
|
||||
# sorts before 0.2.0). A development build is versioned after the last
|
||||
# tag: 3 commits past v0.2.0-rc.1 is 0.2.0~rc.1+git3.gca0f148, which apt
|
||||
# sorts after that RC and before 0.2.0, so installing it upgrades without
|
||||
# --reinstall. Uncommitted changes add the build time (.m20261009153000),
|
||||
# so each such build is newer than the last.
|
||||
DEB_ARCH ?= $(shell dpkg --print-architecture 2>/dev/null || go env GOARCH)
|
||||
DEB_VERSION ?= $(subst -,~,$(VERSION))
|
||||
DEB_DEV_VERSION := $(shell [ -n '$(DESCRIBE)' ] || exit 0; \
|
||||
m=; git diff --quiet HEAD 2>/dev/null || m=.m$$(date -u +%Y%m%d%H%M%S); \
|
||||
echo '$(DESCRIBE)' | sed -E 's/^v(.*)-([0-9]+)-g([0-9a-f]{7})[0-9a-f]*$$/\1+git\2.g\3/' | tr - '~' | sed "s/$$/$$m/")
|
||||
DEB_VERSION ?= $(if $(RELEASE_TAG),$(subst -,~,$(VERSION)),$(or $(DEB_DEV_VERSION),$(subst -,~,$(VERSION))))
|
||||
|
||||
.PHONY: all build completion test vet e2e install install-files uninstall deb dist cli-dist clean
|
||||
|
||||
|
||||
Reference in new issue
Block a user