Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/opus/src/win32/genversion.bat

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Pre-increment instead of post-increment Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/opus/src/win32/.gitignore ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/opus/src/win32/genversion.bat
diff --git a/third_party/opus/src/win32/genversion.bat b/third_party/opus/src/win32/genversion.bat
index cd1d4dce6ed8f5486ee31a3f5a14dab8bc038e0c..1def7460b5e02fa18998a57e0e0efc5ab3134ed5 100755
--- a/third_party/opus/src/win32/genversion.bat
+++ b/third_party/opus/src/win32/genversion.bat
@@ -2,13 +2,13 @@
setlocal enableextensions enabledelayedexpansion
-for /f %%v in ('git --git-dir="%~dp0..\.git" describe --tags --match "v*"') do set version=%%v
+for /f %%v in ('cd "%~dp0.." ^&^& git status ^>NUL 2^>NUL ^&^& git describe --tags --match "v*" --dirty 2^>NUL') do set version=%%v
-if not "%version%"=="" goto :gotversion
+if not "%version%"=="" set version=!version:~1! && goto :gotversion
-if exist "%~dp0..\version.mk" goto :getversion
+if exist "%~dp0..\package_version" goto :getversion
-echo Git cannot be found, nor can version.mk. Generating unknown version.
+echo Git cannot be found, nor can package_version. Generating unknown version.
set version=unknown
@@ -16,25 +16,16 @@ goto :gotversion
:getversion
-for /f "delims== tokens=2" %%v in (%~dps0..\version.mk) do set version=%%v
-
-set version=!version:^"=!
-set version=!version: =!
+for /f "delims== tokens=2" %%v in (%~dps0..\package_version) do set version=%%v
+set version=!version:"=!
:gotversion
+set version=!version: =!
set version_out=#define %~2 "%version%"
-set version_mk=%~2 = "%version%"
echo %version_out%> "%~1_temp"
-if %version%==unknown goto :skipgenerate
-
-echo # static version string; update manually every release.> "%~dp0..\version.mk"
-echo %version_mk%>> "%~dp0..\version.mk"
-
-:skipgenerate
-
echo n | comp "%~1_temp" "%~1" > NUL 2> NUL
if not errorlevel 1 goto exit
« no previous file with comments | « third_party/opus/src/win32/.gitignore ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698