Skip to content

Commit 087d8ae

Browse files
committed
autoversioning for production quality releases
1 parent 6b8a780 commit 087d8ae

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

travis-ci/autoversion.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@ function update_ai {
1717
for nuspec in $f/../*.nuspec; do
1818
if [[ -f "$nuspec" ]]; then
1919
echo "Processing nuspec file: $nuspec"
20-
padded=$(printf "%04d" $REVISION)
21-
sed -i.bak "s/\\\$version\\\$/$VERSION_STR-cibuild$padded/g" $nuspec
20+
if [[ $VERSION =~ "^v?[1-9]" && $REVISION == "0" ]]; then
21+
sed -i.bak "s/\\\$version\\\$/$VERSION_STR/g" $nuspec
22+
else
23+
padded=$(printf "%04d" $REVISION)
24+
sed -i.bak "s/\\\$version\\\$/$VERSION_STR-cibuild$padded/g" $nuspec
25+
fi
2226
fi
2327
done
2428
}

0 commit comments

Comments
 (0)