Тест новой версии

This commit is contained in:
Danil Kislov
2019-03-18 23:12:51 +03:00
parent eccd262124
commit 7927dfba8d
3 changed files with 19 additions and 7 deletions
+1
View File
@@ -0,0 +1 @@
1.0.7
+17 -5
View File
@@ -1,20 +1,32 @@
@echo off
for /f "tokens=1 delims=." %%G IN (semver.txt) DO set MAJOR=%%G
for /f "tokens=2 delims=." %%G IN (semver.txt) DO set MINOR=%%G
for /f "tokens=3 delims=." %%G IN (semver.txt) DO set PATCH=%%G
IF %1.==. GOTO NoCommitMessage
echo %~1
pause
for /f "tokens=1 delims=." %%G IN (.semver.txt) DO set MAJOR=%%G
for /f "tokens=2 delims=." %%G IN (.semver.txt) DO set MINOR=%%G
for /f "tokens=3 delims=." %%G IN (.semver.txt) DO set PATCH=%%G
set VERSION_CURRENT=%MAJOR:~0,1%.%MINOR:~0,1%.%PATCH%
echo Current: %VERSION_CURRENT%
SET /a PATCH1 = %PATCH%+1
set VERSION=%MAJOR:~0,1%.%MINOR:~0,1%.%PATCH1%
echo %VERSION%>semver.txt
echo %VERSION%>.semver.txt
echo Updating to %VERSION%
git add .
git commit -m "Commit new version"
git commit -m "%~1"
git tag -m "Version v%VERSION%" -a v%VERSION%
git push origin v%VERSION%
git push
GOTO End
pause
:NoCommitMessage
echo Please specify commit message: %0 "commit message"
GOTO End
:End
-1
View File
@@ -1 +0,0 @@
1.0.4