Regenerate version files from RELEASE in a workflow

The version files were derived from RELEASE by a script kept outside this
repository, so bumping RELEASE and updating src/version.h, the spec version
and debian/changelog were separate manual steps.

Do it in a workflow triggered by a change to RELEASE. It writes the same
content the external script produced, verified byte for byte against the
current tree.

The build date is now minted once, when RELEASE changes, and stored in
version.h rather than taken from the clock of whichever build is running. The
package workflows read it from there, so rebuilding a commit produces the same
version string and the same package file names. Re-running the workflow
without a RELEASE change keeps the existing build date and makes no commit.
This commit is contained in:
Vladimir Dubrovin committed 2026-08-22 13:34:35 +03:00
1 parent 7a80a6ceb8
commit 3dcd83e6d6
4 files changed
+102 -3

No files matched your search

+3 -1
View File
@@ -26,7 +26,9 @@ jobs:
run: |
pwd
echo "RELEASE=$(cat RELEASE)" >> $GITHUB_ENV
echo "VERSION=$(date +%y%m%d%H%M%S)" >> $GITHUB_ENV
BUILDDATE=$(sed -n 's/^#define BUILDDATE "\(.*\)"$/\1/p' src/version.h)
[ -n "$BUILDDATE" ] || BUILDDATE=$(date +%y%m%d%H%M%S)
echo "VERSION=$BUILDDATE" >> $GITHUB_ENV
- name: configure deb env
run: |
mkdir ~/debian