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

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

Issue 2195313002: Remove Opus from DEPS and import a local copy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Local copy of opus, opus/src/.gitignore, opus/DEPS, update README.chromium Created 4 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/tests/test_opus_padding.c ('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
new file mode 100755
index 0000000000000000000000000000000000000000..cd1d4dce6ed8f5486ee31a3f5a14dab8bc038e0c
--- /dev/null
+++ b/third_party/opus/src/win32/genversion.bat
@@ -0,0 +1,46 @@
+@echo off
+
+setlocal enableextensions enabledelayedexpansion
+
+for /f %%v in ('git --git-dir="%~dp0..\.git" describe --tags --match "v*"') do set version=%%v
+
+if not "%version%"=="" goto :gotversion
+
+if exist "%~dp0..\version.mk" goto :getversion
+
+echo Git cannot be found, nor can version.mk. Generating unknown version.
+
+set version=unknown
+
+goto :gotversion
+
+:getversion
+
+for /f "delims== tokens=2" %%v in (%~dps0..\version.mk) do set version=%%v
+
+set version=!version:^"=!
+set version=!version: =!
+
+:gotversion
+
+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
+
+copy /y "%~1_temp" "%~1"
+
+:exit
+
+del "%~1_temp"
« no previous file with comments | « third_party/opus/src/tests/test_opus_padding.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698