08195cfc03
On windows they no longer need the user to press enter every step Moved version info out to version.txt, This will only effect the svn. If you update the version do it in version.txt not in ForgeHooks.java. Introduced the build number into the version string. Cleaned up some extra echos in scripts.
20 lines
558 B
Batchfile
20 lines
558 B
Batchfile
@echo off
|
|
setlocal enableextensions enabledelayedexpansion
|
|
FOR /F "tokens=1-4" %%A IN (version.txt) DO (
|
|
set major=%%A
|
|
set minor=%%B
|
|
set revision=%%C
|
|
set build=%%D
|
|
)
|
|
set file=%*
|
|
|
|
echo Injecting Revision !major!.!minor!.!revision!.!build! %file%
|
|
|
|
set PATH=.\bin;%PATH%
|
|
sed s/majorVersion=0/majorVersion=!major!/ <!file! | ^
|
|
sed s/minorVersion=0/minorVersion=!minor!/ | ^
|
|
sed s/revisionVersion=0/revisionVersion=!revision!/ | ^
|
|
sed s/buildVersion=0/buildVersion=!build!/ | ^
|
|
tr -d '\r' >!file!.tmp
|
|
|
|
mv "!file!.tmp" "!file!"
|