Skip to content

Commit

Permalink
Merge pull request #279 from BubuOT/version_fix
Browse files Browse the repository at this point in the history
determineVersion.sh: prevent traversing into outer git repo for git-describe call
  • Loading branch information
raboof authored Sep 20, 2024
2 parents 0fe341e + 6423bdf commit 632a788
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions determineVersion.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash

(git describe --tags 2>/dev/null || pwd | sed -e "s/.*\\///" | sed -e "s/[^-]*//") | tail -c +2
if [ $(git rev-parse --show-toplevel 2>/dev/null) == $(pwd) ]; then
git describe --tags 2>/dev/null | tail -c +2
else
pwd | sed -e "s/.*\\///" | sed -e "s/[^-]*//" | tail -c +2
fi

0 comments on commit 632a788

Please sign in to comment.