Include git hash in version
This commit is contained in:
1 parent
a8371303c8
commit
207f1a02f0
3 files changed
+12
-3
No files matched your search
@@ -19,6 +19,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib;
|
||||
|
||||
namespace Vocaluxe.Base
|
||||
@@ -180,8 +181,11 @@ namespace Vocaluxe.Base
|
||||
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalse
|
||||
if (VersionRevision != ERevision.Release)
|
||||
{
|
||||
// ReSharper restore ConditionIsAlwaysTrueOrFalse
|
||||
version += " " + _GetVersionStatus() + String.Format(" ({0:0000)}", _Assembly.Version.Revision);
|
||||
var gitversion = Application.ProductVersion;
|
||||
version += " " + _GetVersionStatus() + String.Format(" ({0})", gitversion);
|
||||
}
|
||||
|
||||
return version;
|
||||
}
|
||||
|
||||
@@ -50,4 +50,5 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
|
||||
[assembly: AssemblyVersion("0.3.0.83")]
|
||||
[assembly: AssemblyFileVersion("0.3.0.83")]
|
||||
[assembly: AssemblyFileVersion("0.3.0.83")]
|
||||
[assembly: AssemblyInformationalVersion("GITVERSION")]
|
||||
@@ -509,7 +509,11 @@
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>xcopy /E /D /Y "$(ProjectDir)\Website" "$(SolutionDir)\PhoneGap"</PostBuildEvent>
|
||||
<PostBuildEvent>xcopy /E /D /Y "$(ProjectDir)\Website" "$(SolutionDir)\PhoneGap"
|
||||
powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace '(?<=AssemblyInformationalVersion\()(.*)(?=\))', '\"GITVERSION\"'} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs'"</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>powershell -command "$version = git describe --long; (Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace 'GITVERSION', $version} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs'"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
Reference in new issue
Block a user