summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2010-06-11 10:52:13 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2010-06-11 10:52:13 -0700
commit730e1a51e6e7c85a05d26dec0d041aecb8529f51 (patch)
treea38bbcbfa63cce9fb69bc97983ca826b14ec8dd0 /src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
parent45519ce569b708076a26b99d34e150608273ca24 (diff)
downloadDotNetOpenAuth-730e1a51e6e7c85a05d26dec0d041aecb8529f51.zip
DotNetOpenAuth-730e1a51e6e7c85a05d26dec0d041aecb8529f51.tar.gz
DotNetOpenAuth-730e1a51e6e7c85a05d26dec0d041aecb8529f51.tar.bz2
A new ohloh.proj project builds the Ohloh instruct file and upload script now. Woot.
Diffstat (limited to 'src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs')
-rw-r--r--src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs b/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
index 1d60ca4..dfb3468 100644
--- a/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
+++ b/src/DotNetOpenAuth.BuildTasks/GetBuildVersion.cs
@@ -10,6 +10,11 @@ using Microsoft.Build.Utilities;
namespace DotNetOpenAuth.BuildTasks {
public class GetBuildVersion : Task {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="GetBuildVersion"/> class.
+ /// </summary>
+ public GetBuildVersion() {
+ }
/// <summary>
/// Gets the version string to use in the compiled assemblies.
@@ -18,6 +23,12 @@ namespace DotNetOpenAuth.BuildTasks {
public string Version { get; private set; }
/// <summary>
+ /// Gets the version string to use in the official release name (lacks revision number).
+ /// </summary>
+ [Output]
+ public string SimpleVersion { get; private set; }
+
+ /// <summary>
/// Gets the Git revision control commit id for HEAD (the current source code version).
/// </summary>
[Output]
@@ -37,9 +48,11 @@ namespace DotNetOpenAuth.BuildTasks {
public override bool Execute() {
try {
Version typedVersion = ReadVersionFromFile();
- typedVersion = new Version(typedVersion.Major, typedVersion.Minor, typedVersion.Build, CalculateJDate(DateTime.Now));
- Version = typedVersion.ToString();
+ SimpleVersion = typedVersion.ToString();
+ var fullVersion = new Version(typedVersion.Major, typedVersion.Minor, typedVersion.Build, CalculateJDate(DateTime.Now));
+ Version = fullVersion.ToString();
+
this.GitCommitId = GetGitHeadCommitId();
} catch (ArgumentOutOfRangeException ex) {
Log.LogErrorFromException(ex);