Skip to content

Commit 471631e

Browse files
committed
Change bump version scripts to simple CLI app
1 parent 7c7cfcf commit 471631e

9 files changed

+58
-28
lines changed

Build/bump-version-UnitsNet-major.bat

Lines changed: 0 additions & 5 deletions
This file was deleted.

Build/bump-version-UnitsNet-minor.bat

Lines changed: 0 additions & 5 deletions
This file was deleted.

Build/bump-version-UnitsNet-patch.bat

Lines changed: 0 additions & 5 deletions
This file was deleted.

Build/bump-version-UnitsNet.Serialization.JsonNet-major.bat

Lines changed: 0 additions & 4 deletions
This file was deleted.

Build/bump-version-UnitsNet.Serialization.JsonNet-minor.bat

Lines changed: 0 additions & 4 deletions
This file was deleted.

Build/bump-version-UnitsNet.Serialization.JsonNet-patch.bat

Lines changed: 0 additions & 4 deletions
This file was deleted.

Build/bump-version-json.bat

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@echo off
2+
rem This scripts increases the version of nugets: UnitsNet.Serialization.JsonNet.
3+
rem The change is committed and tagged locally, but must be pushed to origin/master to take effect.
4+
rem Only contributors with write access can perform this directly to master, others must perform via pull request.
5+
6+
SET scriptdir=%~dp0
7+
echo Bump version UnitsNet.Serialization.JsonNet nuget:
8+
echo.
9+
echo 1: minor 4.90.0 to 4.91.0
10+
echo 2: patch 4.90.0 to 4.90.1
11+
echo 3: suffix 5.0.0-beta1 to 5.0.0-beta2
12+
echo 999: major 4.90.0 to 5.0.0
13+
echo 0: Exit
14+
echo.
15+
16+
set choice=
17+
set /p choice=Choose option:
18+
19+
set bumpval=
20+
if '%choice%'=='1' set bumpval=minor
21+
if '%choice%'=='2' set bumpval=patch
22+
if '%choice%'=='3' set bumpval=suffix
23+
if '%choice%'=='999' set bumpval=major
24+
if '%choice%'=='0' exit /b 0
25+
if '%choice%'=='' exit /b 0
26+
27+
call powershell -NoProfile %scriptdir%\set-version-UnitsNet.Serialization.JsonNet.ps1 -bump %bumpval%
28+
if %errorlevel% neq 0 exit /b %errorlevel%

Build/bump-version.bat

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
@echo off
2+
rem This scripts increases the version of nugets: UnitsNet, UnitsNet.NumberExtensions.
3+
rem The change is committed and tagged locally, but must be pushed to origin/master to take effect.
4+
rem Only contributors with write access can perform this directly to master, others must perform via pull request.
5+
6+
SET scriptdir=%~dp0
7+
echo Bump version UnitsNet and UnitsNet.NumberExtensions:
8+
echo.
9+
echo 1: minor 4.90.0 to 4.91.0
10+
echo 2: patch 4.90.0 to 4.90.1
11+
echo 3: suffix 5.0.0-beta1 to 5.0.0-beta2
12+
echo 999: major 4.90.0 to 5.0.0
13+
echo 0: Exit
14+
echo.
15+
16+
set choice=
17+
set /p choice=Choose option:
18+
19+
set bumpval=
20+
if '%choice%'=='1' set bumpval=minor
21+
if '%choice%'=='2' set bumpval=patch
22+
if '%choice%'=='3' set bumpval=suffix
23+
if '%choice%'=='999' set bumpval=major
24+
if '%choice%'=='0' exit /b 0
25+
if '%choice%'=='' exit /b 0
26+
27+
call powershell -NoProfile %scriptdir%\set-version-UnitsNet.ps1 -bump %bumpval%
28+
if %errorlevel% neq 0 exit /b %errorlevel%

Build/set-version-UnitsNet.Serialization.JsonNet.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,5 @@ $projectName = "JsonNet"
5656
$newVersion = Get-NewProjectVersion $projFile $paramSet $setVersion $bumpVersion
5757

5858
Set-ProjectVersion $projFile $newVersion
59-
Invoke-CommitAndTagVersion $projectName $versionFiles $newVersion
59+
Invoke-CommitVersionBump @($projectName) $versionFiles $newVersion
60+
Invoke-TagVersionBump $projectName $newVersion

0 commit comments

Comments
 (0)