From 2c3e4696b3e223a9346552354a4fe40a76758555 Mon Sep 17 00:00:00 2001 From: Runar Borge Date: Sat, 9 May 2020 22:23:14 +0200 Subject: T2267: Versioning: Update version tag from GIT repo This commit will update the version field of the generated deb package from the git repo version tag. the tag needs to be in the format "vyos/" eg. "vyos/1.2.5" 1.2.5 is then used as the version The version field will be one of the following syntaxes: on a commit: - --g eg. 1.2.5-4-g23232343 on a commit with unstaged changes: - --g+dirty eg. 1.2.5-4-g23232343+dirty This will make it clear what state the repo was in when the package was generated. It is possible to remove the number and commit id on the tagged commit, but i've decided to use the same format for all commits tagged or not. as for now the tagged commit will be sufixed with -0-g if no valid tag is recieved from `git describe`, the script uses a 0.0 version number. The changelog is also updated to reflext that we dont use it and refers to the Git Changelog and vyos release-notes --- debian/rules | 3 +++ 1 file changed, 3 insertions(+) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 144132389..3e408b538 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,9 @@ SERVICES_DIR := usr/libexec/vyos/services %: dh $@ --with python3, --with quilt +override_dh_gencontrol: + dh_gencontrol -- -v$(shell (git describe --tags --long --match 'vyos/*' --dirty 2>/dev/null || echo 0.0-no.git.tag) | sed -E 's%vyos/%%' | sed -E 's%-dirty%+dirty%') + override_dh_auto_build: make all -- cgit v1.2.3