mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Set the ZIP version automatically.
This commit is contained in:
parent
9859ec422f
commit
9429fae4fc
13
build.bat
13
build.bat
@ -1,8 +1,6 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL
|
||||
|
||||
SET "VERSION=3.4.1"
|
||||
|
||||
CD /D %~dp0
|
||||
|
||||
rem Check for the help switches
|
||||
@ -55,6 +53,7 @@ IF /I "%BUILDTYPE%" == "Clean" GOTO END
|
||||
|
||||
CALL :SubDetectSevenzipPath
|
||||
IF DEFINED SEVENZIP_PATH IF EXIST "%SEVENZIP_PATH%" (
|
||||
CALL :SubGetVersion
|
||||
CALL :SubZipFile
|
||||
)
|
||||
|
||||
@ -138,6 +137,16 @@ ENDLOCAL
|
||||
EXIT /B
|
||||
|
||||
|
||||
:SubGetVersion
|
||||
FOR /F delims^=^"^ tokens^=2 %%A IN ('FINDSTR /R /C:"AssemblyVersion" "src\Properties\AssemblyInfo.cs.template"') DO (
|
||||
rem 3.4.1.[REVNO]
|
||||
SET "VERSION=%%A"
|
||||
)
|
||||
rem 3.4.1: 0 from the left and -8 chars from the right
|
||||
SET "VERSION=%VERSION:~0,-8%"
|
||||
EXIT /B
|
||||
|
||||
|
||||
:SubDetectSevenzipPath
|
||||
FOR %%G IN (7z.exe) DO (SET "SEVENZIP_PATH=%%~$PATH:G")
|
||||
IF EXIST "%SEVENZIP_PATH%" (SET "SEVENZIP=%SEVENZIP_PATH%" & EXIT /B)
|
||||
|
Loading…
Reference in New Issue
Block a user