1 Star 0 Fork 1

machh03/gpac

forked from tongg112/gpac 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
version.bat 693 Bytes
一键复制 编辑 原始数据 按行查看 历史
cconcolato 提交于 2015-01-22 17:53 +08:00 . fix version generation for windows
@echo off
set OLDDIR=%CD%
cd /d %~dp0
for /f "delims=" %%a in ('git describe --tags --long') do @set VERSION=%%a
for /f "delims=" %%a in ('git describe --tags --abbrev^=0') do @set TAG=%%a-
for /f "delims=" %%a in ('git rev-parse --abbrev-ref HEAD') do @set BRANCH=%%a
REM remove anotated tag from VERSION
setlocal enabledelayedexpansion
call set VERSION=%%VERSION:!TAG!=%%
setlocal disabledelayedexpansion
echo #define GPAC_GIT_REVISION "%VERSION%-%BRANCH%" > test.h
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
:done
cd /d %OLDDIR%
exit/b
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/machh03/gpac.git
git@gitee.com:machh03/gpac.git
machh03
gpac
gpac
master

搜索帮助