Fixed nuspec version builder

This commit is contained in:
Joel Collins 2019-05-10 12:13:25 +01:00
parent e47a26d050
commit bf7c3bcd91
2 changed files with 15 additions and 7 deletions

View file

@ -21,13 +21,21 @@ packageVersion=$(cat $packageJson \
| sed 's/[",]//g' \
| tr -d '[[:space:]]')
# Convert into a nupkg-safe version string
majVer="$(echo $packageVersion | cut -d'-' -f1)"
minVer="$(echo $packageVersion | cut -d'-' -f2)"
minVer="${minVer//.}"
version="$majVer-$minVer"
echo "$packageVersion"
echo $version
# Convert into a nupkg-safe version string
majVer="$(echo "$packageVersion" | cut -d'-' -f1)"
minVer="$(echo "$packageVersion" | cut -d'-' -f2)"
if [ "$majVer" = "$minVer" ]; then
version="$majVer"
else
minVer="${minVer//.}"
version="$majVer-$minVer"
fi
echo "$version"
# Build installer URL
instURL="$CI_JOB_URL/artifacts/raw/release-builds/openflexure-ev-win.exe"