diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-28 07:23:51 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-28 07:23:51 -0800 |
commit | 66a722ac805f822dbfb4f5d1b76b315b426b9e26 (patch) | |
tree | 045321a0ceb819844c5a331474bb08ec0ecb5e4a /tools/DotNetOpenAuth.Versioning.targets | |
parent | 6050732e725c68b83c35c873ff8808dff1c406e1 (diff) | |
download | DotNetOpenAuth-66a722ac805f822dbfb4f5d1b76b315b426b9e26.zip DotNetOpenAuth-66a722ac805f822dbfb4f5d1b76b315b426b9e26.tar.gz DotNetOpenAuth-66a722ac805f822dbfb4f5d1b76b315b426b9e26.tar.bz2 |
Builds now include the git commit ID in the PE file header so we have a definite record of where a build came from.
Diffstat (limited to 'tools/DotNetOpenAuth.Versioning.targets')
-rw-r--r-- | tools/DotNetOpenAuth.Versioning.targets | 12 |
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)"> |