GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — gpac/version.bat at master · gpac/gpac Expand file tree/ Copy pathversion.batMore file actions 57 lines (47 loc) · 1.33 KB / Copy pathversion.batFile metadata and controls57 lines (47 loc) · 1.33 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 @echo off set OLDDIR=%CD% cd /d %~dp0 IF NOT EXIST .\.git\NUL GOTO not_git for /f "delims=" %%a in ('git describe --tags --long --match "v*" ') do @set VERSION=%%a for /f "delims=" %%a in ('git describe --tags --abbrev^=0 --match "v*" ') do @set TAG=%%a- for /f "delims=" %%a in ('git rev-parse --abbrev-ref HEAD') do @set BRANCH=%%a REM sanitize BRANCH for filename set "BRANCH=%BRANCH:/=-%" set "BRANCH=%BRANCH:"=-%" set "BRANCH=%BRANCH:<=-%" set "BRANCH=%BRANCH:>=-%" set "BRANCH=%BRANCH:|=-%" set "BRANCH=%BRANCH:@=-%" set "BRANCH=%BRANCH:_=-%" set "BRANCH=%BRANCH:(=-%" set "BRANCH=%BRANCH:)=-%" REM remove anotated tag from VERSION setlocal enabledelayedexpansion call set VERSION=%%VERSION:!TAG!=%% setlocal disabledelayedexpansion echo #define GPAC_GIT_REVISION "%VERSION%-%BRANCH%" > test.h :write_file if not exist include\gpac\revision.h goto create ECHO n|COMP test.h include\gpac\revision.h > nul if errorlevel 1 goto create DEL test.h goto done :create MOVE /Y test.h include\gpac\revision.h goto done :not_git echo "not a git dir" find /c "-DEV" include\gpac\version.h >nul if %errorlevel% equ 1 goto rel_tag echo "unknown tag" @echo off echo #define GPAC_GIT_REVISION "UNKNOWN_REV" > test.h goto write_file :rel_tag echo "release tag" @echo off echo #define GPAC_GIT_REVISION "release" > test.h goto write_file :done cd /d %OLDDIR% exit/b |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |