summaryrefslogtreecommitdiffstats
path: root/tools/DotNetOpenAuth.Versioning.targets
diff options
context:
space:
mode:
Diffstat (limited to 'tools/DotNetOpenAuth.Versioning.targets')
-rw-r--r--tools/DotNetOpenAuth.Versioning.targets12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/DotNetOpenAuth.Versioning.targets b/tools/DotNetOpenAuth.Versioning.targets
index 6a4b95a..57b63de 100644
--- a/tools/DotNetOpenAuth.Versioning.targets
+++ b/tools/DotNetOpenAuth.Versioning.targets
@@ -5,6 +5,7 @@
<PropertyGroup>
<ProjectRoot Condition="'$(ProjectRoot)' == ''">$(MSBuildProjectDirectory)\..\..\</ProjectRoot>
<VersionCsFile>$(ProjectRoot)obj\$(Configuration)\$(AssemblyName).Version.cs</VersionCsFile>
+ <NoWarn>$(NoWarn);1607</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(SignAssembly)' == 'true'">
@@ -18,10 +19,13 @@
<UsingTask AssemblyFile="$(ProjectRoot)lib\MSBuild.Community.Tasks.dll" TaskName="AssemblyInfo"/>
<Target Name="GetBuildVersion">
- <GetBuildVersion VersionFile="$(ProjectRoot)src\version.txt" Condition=" '$(BuildVersion)' == '' ">
+ <GetBuildVersion Condition=" '$(BuildVersion)' == '' "
+ VersionFile="$(ProjectRoot)src\version.txt"
+ GitRepoRoot="$(ProjectRoot)">
<Output TaskParameter="Version" PropertyName="BuildVersion" />
+ <Output TaskParameter="GitCommitId" PropertyName="AssemblyInformationalVersion" />
</GetBuildVersion>
- <Message Text="Building version $(BuildVersion)"/>
+ <Message Text="Building version $(BuildVersion) from commit $(AssemblyInformationalVersion)"/>
</Target>
<Target Name="BeforeBuild" DependsOnTargets="GetBuildVersion">
@@ -29,7 +33,9 @@
<NewVersionCsFile>$(VersionCsFile).new</NewVersionCsFile>
</PropertyGroup>
<MakeDir Directories="$(ProjectRoot)obj\$(Configuration)"/>
- <AssemblyInfo OutputFile="$(NewVersionCsFile)" CodeLanguage="C#" AssemblyVersion="$(BuildVersion)" />
+ <AssemblyInfo OutputFile="$(NewVersionCsFile)" CodeLanguage="C#"
+ AssemblyVersion="$(BuildVersion)"
+ AssemblyInformationalVersion="$(AssemblyInformationalVersion)" />
<!-- Avoid applying the newly generated AssemblyInfo.cs file to the build
unless it has changed in order to allow for incremental building. -->
<CompareFiles OriginalItems="$(VersionCsFile)" NewItems="$(NewVersionCsFile)">