DroneCI doesn't fetch tags by default
All checks were successful
continuous-integration/drone/push Build is passing

- Added `git fetch --tags` as the first command
- Changes to compile_vergen.sh in order to debug.
This commit is contained in:
Kieron Morris 2025-03-09 19:16:23 +00:00
parent 96fcf19c14
commit d4236f455e
2 changed files with 3 additions and 0 deletions

View File

@ -20,6 +20,7 @@ steps:
depends_on: depends_on:
- build-image - build-image
commands: commands:
- git fetch --tags
- find . -type f -print0 | xargs -0 dos2unix - find . -type f -print0 | xargs -0 dos2unix
- chmod +x /drone/src/*.sh - chmod +x /drone/src/*.sh
- /drone/src/compile.sh - /drone/src/compile.sh

View File

@ -14,6 +14,8 @@ file="version"
wget -q https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver -O bin/semver && chmod +x bin/semver wget -q https://raw.githubusercontent.com/fsaintjacques/semver-tool/master/src/semver -O bin/semver && chmod +x bin/semver
export PATH="$(pwd)/bin:$PATH" export PATH="$(pwd)/bin:$PATH"
} }
pwd
ls
tagref=$(git describe --tags) tagref=$(git describe --tags)
revision=$(git rev-parse --short=8 HEAD) revision=$(git rev-parse --short=8 HEAD)
major=$(semver get major $tagref) major=$(semver get major $tagref)