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

Unified Diff: opus/win32/genversion.bat

Issue 11196031: Add copy of opus library in deps/third_party. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/
Patch Set: Created 8 years, 2 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 | « opus/win32/config.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: opus/win32/genversion.bat
===================================================================
--- opus/win32/genversion.bat (revision 0)
+++ opus/win32/genversion.bat (revision 0)
@@ -0,0 +1,46 @@
+@echo off
+
+setlocal enableextensions enabledelayedexpansion
+
+for /f %%v in ('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 (%~dp0..\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
Property changes on: opus/win32/genversion.bat
___________________________________________________________________
Added: svn:eol-style
+ CRLF
« no previous file with comments | « opus/win32/config.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698