summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-12-28 08:56:25 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-12-28 08:56:25 -0800
commite8454fabc97cbc7fe3488b966e0cc7de42631369 (patch)
treef5e5091e9f7c9f99f760b81262f49cfa4e9cf6a6
parentd82ec9192964afab5a2cffa5ada56814c8e1a7b2 (diff)
parentf34e5ade48e0f6fa710b658bec715972460dfcb5 (diff)
downloadDotNetOpenAuth-e8454fabc97cbc7fe3488b966e0cc7de42631369.zip
DotNetOpenAuth-e8454fabc97cbc7fe3488b966e0cc7de42631369.tar.gz
DotNetOpenAuth-e8454fabc97cbc7fe3488b966e0cc7de42631369.tar.bz2
Merge branch 'v3.3'
-rw-r--r--lib/DotNetOpenAuth.BuildTasks.dllbin57856 -> 57856 bytes
-rw-r--r--lib/DotNetOpenAuth.BuildTasks.pdbbin144896 -> 144896 bytes
-rw-r--r--src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs6
-rw-r--r--tools/DotNetOpenAuth.Versioning.targets8
4 files changed, 9 insertions, 5 deletions
diff --git a/lib/DotNetOpenAuth.BuildTasks.dll b/lib/DotNetOpenAuth.BuildTasks.dll
index a35c306..9dfd63e 100644
--- a/lib/DotNetOpenAuth.BuildTasks.dll
+++ b/lib/DotNetOpenAuth.BuildTasks.dll
Binary files differ
diff --git a/lib/DotNetOpenAuth.BuildTasks.pdb b/lib/DotNetOpenAuth.BuildTasks.pdb
index d818880..b27ee26 100644
--- a/lib/DotNetOpenAuth.BuildTasks.pdb
+++ b/lib/DotNetOpenAuth.BuildTasks.pdb
Binary files differ
diff --git a/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs b/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
index 3124065..48b5d5c 100644
--- a/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
+++ b/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
@@ -59,10 +59,8 @@ namespace DotNetOpenAuth.BuildTasks {
string refName = headContent.Substring(5).Trim();
headContent = File.ReadAllText(Path.Combine(this.GitRepoRoot, @".git/" + refName)).Trim();
}
- } catch (FileNotFoundException) { }
-
- if (string.IsNullOrEmpty(headContent)) {
- Log.LogWarning("Unable to determine the git HEAD commit ID to use for informational version number.");
+ } catch (FileNotFoundException) {
+ } catch (DirectoryNotFoundException) {
}
return headContent.Trim();
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">