From 87344df8ee25676cbc582770c2812aaf1d9719ad Mon Sep 17 00:00:00 2001 From: vadym Date: Mon, 13 Sep 2021 13:05:31 +0300 Subject: [PATCH] 1. msi version fix --- contrib/msi/msversion.sh | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/contrib/msi/msversion.sh b/contrib/msi/msversion.sh index 61f221d9..c33bfad6 100644 --- a/contrib/msi/msversion.sh +++ b/contrib/msi/msversion.sh @@ -17,30 +17,6 @@ if [ $? != 0 ] || [ -z "$BRANCH" ]; then BRANCH="master" fi -# Split out into major, minor and patch numbers -MAJOR=$(echo $TAG | cut -c 2- | cut -d "." -f 1) -MINOR=$(echo $TAG | cut -c 2- | cut -d "." -f 2) -PATCH=$(echo $TAG | cut -c 2- | cut -d "." -f 3 | awk -F"rc" '{print $1}') +STAG=$(echo $TAG | sed 's/v//') -# Output in the desired format -if [ $((PATCH)) -eq 0 ]; then - printf '%s%d.%d' "$PREPEND" "$((MAJOR))" "$((MINOR))" -else - printf '%s%d.%d.%d' "$PREPEND" "$((MAJOR))" "$((MINOR))" "$((PATCH))" -fi - -# Add the build tag on non-master branches -if [ "$BRANCH" != "master" ]; then - BUILD=$(git rev-list --count $TAG..HEAD 2>/dev/null) - - # Did getting the count of commits since the tag succeed? - if [ $? != 0 ] || [ -z "$BUILD" ]; then - printf -- "-unknown" - exit 0 - fi - - # Is the build greater than zero? - if [ $((BUILD)) -gt 0 ]; then - printf -- "-%04d" "$((BUILD))" - fi -fi \ No newline at end of file +printf '%s' "$STAG"