Skip to content
Snippets Groups Projects

Add new script to determine previous tag

Merged Paul Gessinger requested to merge incremental_build_update into master
3 files
+ 47
14
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 0
13
current_tag=$(git describe --exact-match HEAD 2>&1)
if [ "$?" -ne 0 ]; then
echo "Not on tagged commit"
# use previous tag on branch
export prev_tag=$(git describe --tags --abbrev=0 origin/release)
else
echo "On tagged commit $current_tag"
# this is the case if we are on the release branch
# use tag before this tag
export prev_tag=$(git describe --tags --abbrev=0 origin/release~)
fi
echo "Previous tag to build first $prev_tag"
Loading