summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.BuildTasks
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-01-29 10:18:06 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2012-01-29 10:38:33 -0800
commitcf2ac40a21df5c561f8ee7f65c56ce8d62d2123d (patch)
tree7b306a52153b3c0f84cf0bdd481a7646f4c4fc46 /src/DotNetOpenAuth.BuildTasks
parent94d3bb7d936246c05a9f6b48481832a30fdbcca2 (diff)
downloadDotNetOpenAuth-cf2ac40a21df5c561f8ee7f65c56ce8d62d2123d.zip
DotNetOpenAuth-cf2ac40a21df5c561f8ee7f65c56ce8d62d2123d.tar.gz
DotNetOpenAuth-cf2ac40a21df5c561f8ee7f65c56ce8d62d2123d.tar.bz2
Fixed up all existing NuGet packages and added several more. All but UI dll's are now packaged in NuGet.
Diffstat (limited to 'src/DotNetOpenAuth.BuildTasks')
-rw-r--r--src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.sln8
-rw-r--r--src/DotNetOpenAuth.BuildTasks/NuGetPack.cs27
2 files changed, 11 insertions, 24 deletions
diff --git a/src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.sln b/src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.sln
index 9271e62..ddf80bd 100644
--- a/src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.sln
+++ b/src/DotNetOpenAuth.BuildTasks/DotNetOpenAuth.BuildTasks.sln
@@ -29,14 +29,16 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetOpenAuth.BuildTasks",
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{D49E2011-0E1C-4AB5-9887-BD1D42266503}"
ProjectSection(SolutionItems) = preProject
+ ..\..\nuget\DotNetOpenAuth.Core.nuspec = ..\..\nuget\DotNetOpenAuth.Core.nuspec
+ ..\..\nuget\DotNetOpenAuth.OAuth.Consumer.nuspec = ..\..\nuget\DotNetOpenAuth.OAuth.Consumer.nuspec
+ ..\..\nuget\DotNetOpenAuth.OAuth.Core.nuspec = ..\..\nuget\DotNetOpenAuth.OAuth.Core.nuspec
+ ..\..\nuget\DotNetOpenAuth.OpenId.Core.nuspec = ..\..\nuget\DotNetOpenAuth.OpenId.Core.nuspec
+ ..\..\nuget\DotNetOpenAuth.OpenId.RelyingParty.nuspec = ..\..\nuget\DotNetOpenAuth.OpenId.RelyingParty.nuspec
..\..\nuget\DotNetOpenAuth.Ultimate.nuspec = ..\..\nuget\DotNetOpenAuth.Ultimate.nuspec
..\..\nuget\nuget.proj = ..\..\nuget\nuget.proj
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{BF3868D6-3BBA-4E40-B180-213370C15494}"
- ProjectSection(SolutionItems) = preProject
- ..\..\nuget\content\web.config.transform = ..\..\nuget\content\web.config.transform
- EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/src/DotNetOpenAuth.BuildTasks/NuGetPack.cs b/src/DotNetOpenAuth.BuildTasks/NuGetPack.cs
index 8f61874..1b13ad2 100644
--- a/src/DotNetOpenAuth.BuildTasks/NuGetPack.cs
+++ b/src/DotNetOpenAuth.BuildTasks/NuGetPack.cs
@@ -35,6 +35,11 @@ namespace DotNetOpenAuth.BuildTasks {
public ITaskItem OutputPackageDirectory { get; set; }
/// <summary>
+ /// Gets or sets the semicolon delimited list of properties to supply to the NuGet Pack command to perform token substitution.
+ /// </summary>
+ public string Properties { get; set; }
+
+ /// <summary>
/// Returns the fully qualified path to the executable file.
/// </summary>
/// <returns>
@@ -63,15 +68,7 @@ namespace DotNetOpenAuth.BuildTasks {
Directory.CreateDirectory(Path.GetDirectoryName(this.OutputPackageDirectory.ItemSpec));
}
- string fullPackagePath = this.DeriveFullPackagePath();
- this.Log.LogMessage("Creating NuGet package '{0}'.", fullPackagePath);
-
bool result = base.Execute();
-
- if (result) {
- this.Log.LogMessage(MessageImportance.High, "Successfully created package '{0}'.", fullPackagePath);
- }
-
return result;
}
@@ -88,21 +85,9 @@ namespace DotNetOpenAuth.BuildTasks {
args.AppendFileNameIfNotNull(this.NuSpec);
args.AppendSwitchIfNotNull("-BasePath ", this.BaseDirectory);
args.AppendSwitchIfNotNull("-OutputDirectory ", this.OutputPackageDirectory);
+ args.AppendSwitchIfNotNull("-Properties ", this.Properties);
return args.ToString();
}
-
- /// <summary>
- /// Derives the path to the generated .nupkg file.
- /// </summary>
- /// <returns>A relative path.</returns>
- private string DeriveFullPackagePath() {
- var spec = XDocument.Load(this.NuSpec.ItemSpec);
- var metadata = spec.Element("package").Element("metadata");
- string id = metadata.Element("id").Value;
- string version = metadata.Element("version").Value;
- string baseDirectory = this.OutputPackageDirectory != null ? this.OutputPackageDirectory.ItemSpec : String.Empty;
- return Path.Combine(baseDirectory, String.Format("{0}.{1}.nupkg", id, version));
- }
}
}