diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-28 08:56:25 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-28 08:56:25 -0800 |
commit | e8454fabc97cbc7fe3488b966e0cc7de42631369 (patch) | |
tree | f5e5091e9f7c9f99f760b81262f49cfa4e9cf6a6 /tools/DotNetOpenAuth.Versioning.targets | |
parent | d82ec9192964afab5a2cffa5ada56814c8e1a7b2 (diff) | |
parent | f34e5ade48e0f6fa710b658bec715972460dfcb5 (diff) | |
download | DotNetOpenAuth-e8454fabc97cbc7fe3488b966e0cc7de42631369.zip DotNetOpenAuth-e8454fabc97cbc7fe3488b966e0cc7de42631369.tar.gz DotNetOpenAuth-e8454fabc97cbc7fe3488b966e0cc7de42631369.tar.bz2 |
Merge branch 'v3.3'
Diffstat (limited to 'tools/DotNetOpenAuth.Versioning.targets')
-rw-r--r-- | tools/DotNetOpenAuth.Versioning.targets | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/DotNetOpenAuth.Versioning.targets b/tools/DotNetOpenAuth.Versioning.targets index 57b63de..5047f3a 100644 --- a/tools/DotNetOpenAuth.Versioning.targets +++ b/tools/DotNetOpenAuth.Versioning.targets @@ -25,7 +25,13 @@ <Output TaskParameter="Version" PropertyName="BuildVersion" /> <Output TaskParameter="GitCommitId" PropertyName="AssemblyInformationalVersion" /> </GetBuildVersion> - <Message Text="Building version $(BuildVersion) from commit $(AssemblyInformationalVersion)"/> + <PropertyGroup> + <!-- In TeamCity, the build agent doesn't get the .git directory, but the commit id is available by other means. --> + <AssemblyInformationalVersion Condition=" '$(AssemblyInformationalVersion)' == '' ">$(BUILD_VCS_NUMBER)</AssemblyInformationalVersion> + </PropertyGroup> + <Warning Condition=" '$(AssemblyInformationalVersion)' == '' " Text="Unable to determine the git HEAD commit ID to use for informational version number." /> + <Message Condition=" '$(AssemblyInformationalVersion)' != '' " Text="Building version $(BuildVersion) from commit $(AssemblyInformationalVersion)"/> + <Message Condition=" '$(AssemblyInformationalVersion)' == '' " Text="Building version $(BuildVersion)"/> </Target> <Target Name="BeforeBuild" DependsOnTargets="GetBuildVersion"> |