Skip to content

Commit 44d9d88

Browse files
committed
[TeamCity] Update version bumping
1 parent 54e0661 commit 44d9d88

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

.teamcity/set_build_number.cmd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
REM @echo off
2+
SET BUILD_COUNTER=%1
3+
echo ##teamcity[buildNumber '3.2.2-%1']
4+
5+
REM Do zero-padding
6+
SET PADDED=%BUILD_COUNTER%
7+
IF 1%PADDED% LSS 100 SET PADDED=0%PADDED%
8+
IF 1%PADDED% LSS 1000 SET PADDED=0%PADDED%
9+
IF 1%PADDED% LSS 10000 SET PADDED=0%PADDED%
10+
IF 1%PADDED% LSS 100000 SET PADDED=0%PADDED%
11+
12+
echo ##teamcity[setParameter name='NugetPrereleaseTag' Value='%PADDED%']

bump.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ sed -i 's/<VersionPrefix>[^<]*<\/VersionPrefix>/<VersionPrefix>'$v'<\/VersionPre
1818
sed -i 's/\(<Identity .*Version=\)"[^"]*"/\1"'$v'"/' src/VSIX/source.extension.vsixmanifest
1919
sed -i 's/.*ProvideBindingRedirection.*/[assembly: ProvideBindingRedirection(AssemblyName = "Npgsql", NewVersion = "'$v'.0", OldVersionLowerBound = "0.0.0.0", OldVersionUpperBound = "'$v'.0")]/' src/VSIX/Properties/AssemblyInfo.cs
2020

21-
echo "echo ##teamcity[buildNumber '$v-%1']" > teamcity_set_version.cmd
21+
echo "echo ##teamcity[buildNumber '$v-%1']" > .teamcity/set_build_number.cmd
2222

23-
git add teamcity_set_version.cmd
23+
git add .teamcity/set_build_number.cmd
2424
git add src/Npgsql/Npgsql.csproj
2525
git add src/VSIX/source.extension.vsixmanifest
2626
git add src/VSIX/Properties/AssemblyInfo.cs

teamcity_set_version.cmd

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)