Skip to content

Commit

Permalink
Added the commit ID in binaries.
Browse files Browse the repository at this point in the history
  • Loading branch information
dlebansais committed Jan 21, 2019
1 parent eb5b53e commit 56a1c39
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 4 additions & 2 deletions LargeList/LargeList.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<PreBuildEvent>if exist "$(SolutionDir)updateversion.bat" call "$(SolutionDir)updateversion.bat" "$(SolutionDir)" "$(SolutionPath)"</PreBuildEvent>
<PostBuildEvent>copy /Y "$(SolutionDir)Test\Test-LargeList.dll" "$(TargetDir)"</PostBuildEvent>
<PostBuildEvent>call "$(SolutionDir)updatecommit.bat" "$(SolutionDir)" "$(TargetPath)"
copy /Y "$(SolutionDir)Test\Test-LargeList.dll" "$(TargetDir)"</PostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<PreBuildEvent>if exist "$(SolutionDir)updateversion.bat" call "$(SolutionDir)updateversion.bat" "$(SolutionDir)" "$(SolutionPath)"</PreBuildEvent>
<PostBuildEvent>if exist "$(SolutionDir)signfile.bat" call "$(SolutionDir)signfile.bat" "$(SolutionDir)" "$(Configuration)-$(Platform)" "$(TargetPath)"
<PostBuildEvent>call "$(SolutionDir)updatecommit.bat" "$(SolutionDir)" "$(TargetPath)"
if exist "$(SolutionDir)signfile.bat" call "$(SolutionDir)signfile.bat" "$(SolutionDir)" "$(Configuration)-$(Platform)" "$(TargetPath)"
copy /Y "$(SolutionDir)Test\Test-LargeList.dll" "$(TargetDir)"
</PostBuildEvent>
</PropertyGroup>
Expand Down
9 changes: 9 additions & 0 deletions updatecommit.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
if not exist "%~1..\Version Tools\GitCommitId.exe" goto error
"%~1..\Version Tools\GitCommitId.exe" %2 -u
goto end

:error
echo Failed to update Commit Id.
goto end

:end

0 comments on commit 56a1c39

Please sign in to comment.