Skip to content

Commit

Permalink
#8 Fix version qualifier script for full releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuri-Blankenstein-TNO committed Feb 22, 2024
1 parent 9fba84c commit dbe7fa9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions versionQualifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ QUALIFIER_POSTFIX="dev"

if [ $# -gt 0 ]
then
QUALIFIER_POSTFIX=$(echo $1 | sed -e 's/^[^-]*-//')
QUALIFIER_POSTFIX=$(echo $1 | cut -s -d '-' -f2-)
fi

# Get Git last commit date.
GIT_DATE_EPOCH=$(git log -1 --format=%cd --date=raw | cut -d ' ' -f 1)
GIT_DATE=$(date -d @$GIT_DATE_EPOCH -u +%Y%m%d-%H%M%S)

echo "v$GIT_DATE-$QUALIFIER_POSTFIX"
if [ -z "$QUALIFIER_POSTFIX" ]
then
echo "v$GIT_DATE"
else
echo "v$GIT_DATE-$QUALIFIER_POSTFIX"
fi

0 comments on commit dbe7fa9

Please sign in to comment.