Permalink
Browse files

RANes versioning, ignore files

  • Loading branch information...
1 parent 43d6461 commit f70decb64faf6ccadd6e8161816966bd3097143a Scott Davies committed Apr 7, 2015
Showing with 25 additions and 2 deletions.
  1. +5 −0 .gitignore
  2. +1 −0 RANes/src/drivers/win/main.cpp
  3. +17 −0 RANes/vc/MakeBuildVer.bat
  4. +2 −2 RANes/vc/RANes.vcxproj
View
@@ -242,3 +242,8 @@
/RAGens/win32/Diffs.txt
/RAGens/win32/LiveTag.txt
/RAGens/common/src/BuildVer.h
+/RANes/src/BuildVer.h
+/RANes/vc/Debug/obj
+/RANes/vc/Debug
+/RANes/vc/Diffs.txt
+/RANes/vc/LiveTag.txt
@@ -75,6 +75,7 @@
// ##RA
+#include "../../BuildVer.h"
#include "RA_Resource.h"
#include "RA_Interface.h"
#include "RA_Implementation.h"
@@ -0,0 +1,17 @@
+@echo off
+
+REM git describe --tags --long > LiveTag.txt
+git describe --tags --match "RANes.*" > LiveTag.txt
+@set /p ACTIVE_TAG=<LiveTag.txt
+@set VERSION_NUM=%ACTIVE_TAG:~6,3%
+
+git diff HEAD > Diffs.txt
+@set /p RAW_DIFFS_FOUND=<Diffs.txt
+
+setlocal
+REM set file=
+@for /F "usebackq" %%A in ('"Diffs.txt"') do set DIFF_FILE_SIZE=%%~zA
+@if %DIFF_FILE_SIZE% GTR 0 set ACTIVE_TAG=Unstaged Changes
+
+@echo Tag: %ACTIVE_TAG% (%VERSION_NUM%)
+@echo #define RANES_VERSION "0.%VERSION_NUM%" > ../src/BuildVer.h
@@ -85,7 +85,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
- <Command>SubWCRev.bat</Command>
+ <Command>MakeBuildVer.bat</Command>
</PreBuildEvent>
<ClCompile>
<Optimization>Disabled</Optimization>
@@ -121,7 +121,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<PreBuildEvent>
- <Command />
+ <Command>MakeBuildVer.bat</Command>
</PreBuildEvent>
<ClCompile>
<Optimization>Full</Optimization>

0 comments on commit f70decb

Please sign in to comment.