Skip to content

Commit

Permalink
Merge pull request #2404 from reubenmiller/fix-tag-version
Browse files Browse the repository at this point in the history
build: fix generated version on a tag
  • Loading branch information
reubenmiller authored Nov 2, 2023
2 parents 289044b + 73e72e0 commit 49146ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ci/build_scripts/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ set_version_variables() {
if [ -z "$GIT_SEMVER" ]; then
GIT_DESCRIBE_RAW=$(git describe --always --tags --abbrev=7 2>/dev/null || true)

if [[ "$GIT_DESCRIBE_RAW" =~ ^[a-z0-9]+$ ]]; then
if [[ "$GIT_DESCRIBE_RAW" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
# Tagged release
BASE_VERSION="$GIT_DESCRIBE_RAW"
elif [[ "$GIT_DESCRIBE_RAW" =~ ^[a-z0-9]+$ ]]; then
# Note: Sometimes git describe only prints out the git hash when run on a PR branch
# from someone else. In such instances this causes the version to be incompatible with
# linux package types. For instance, debian versions must start with a digit.
Expand Down

1 comment on commit 49146ba

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
357 0 3 357 100 1h4m49.162s

Please sign in to comment.