Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version.sh #245

Merged
merged 2 commits into from
Dec 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,20 @@ osx_bundle_sed_path="${builddir}/osx-bundle.sed"

last_svn_revision=6962
last_svn_hash="16cd907fe7482cb54a7374cd28b8501f138116be"

# Check if the commit exists first, it doesn't exist in shallow clones.
if [ "$(git cat-file -t $last_svn_hash 2> /dev/null)" = "commit" ]; then
git_revision=$(expr $last_svn_revision + $(git rev-list --count $last_svn_hash..HEAD))
else
git_revision=0
fi
git_version_str=$(git describe --exact-match 2> /dev/null)
git_version_str=$(git describe --tags --exact-match 2> /dev/null)
installer_version='0.0.0'
resource_version='0, 0, 0'
if test x$git_version_str != x; then
git_version_str="${git_version_str##v}"
tagged_release=1
if [ $(echo $git_version_str | grep '\d\.\d\.\d') ]; then
if [ $(echo $git_version_str | grep '^[0-9]\.[0-9]\.[0-9]$') ]; then
installer_version=$git_version_str
resource_version=$(echo $git_version_str | sed 's/\./, /g')
fi
Expand Down
Loading