Skip to content

Commit 9298ec9

Browse files
Acconutcursoragent
andcommitted
build: add fallback version for Debian package when not on a tag
Use v0.0.0-snapshot-<short-sha> when no git tag points at HEAD so dpkg-deb does not fail with empty Version in DEBIAN/control (e.g. on push to main in CI). Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 10cea2b commit 9298ec9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

scripts/build_funcs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -e
44

55
version="$(git tag -l --points-at HEAD)"
6+
[[ -z "$version" ]] && version="v0.0.0-snapshot-$(git rev-parse --short HEAD)"
67
commit=$(git log --format="%H" -n 1)
78

89
function compile {

0 commit comments

Comments
 (0)