diff --git a/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj b/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj
index 2a3e5eed94..4ceef30de4 100644
--- a/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj
+++ b/binding/HarfBuzzSharp.UWP/HarfBuzzSharp.UWP.csproj
@@ -10,10 +10,10 @@
-
-
-
-
+
+
+
+
diff --git a/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj b/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj
index 9895267c0c..7ff892527e 100644
--- a/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj
+++ b/binding/SkiaSharp.UWP/SkiaSharp.UWP.csproj
@@ -9,18 +9,18 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build.cake b/build.cake
index fce5896429..2598c9c8ef 100644
--- a/build.cake
+++ b/build.cake
@@ -52,7 +52,8 @@ var PREVIEW_LABEL = Argument ("previewLabel", EnvironmentVariable ("PREVIEW_LABE
var FEATURE_NAME = EnvironmentVariable ("FEATURE_NAME") ?? "";
var BUILD_NUMBER = Argument ("buildNumber", EnvironmentVariable ("BUILD_NUMBER") ?? "0");
var GIT_SHA = Argument ("gitSha", EnvironmentVariable ("GIT_SHA") ?? "");
-var GIT_BRANCH_NAME = Argument ("gitBranch", EnvironmentVariable ("GIT_BRANCH_NAME") ?? "");
+var GIT_BRANCH_NAME = Argument ("gitBranch", EnvironmentVariable ("GIT_BRANCH_NAME") ?? ""). Replace ("refs/heads/", "");
+var GIT_URL = Argument ("gitUrl", EnvironmentVariable ("GIT_URL") ?? "");
var PREVIEW_NUGET_SUFFIX = string.IsNullOrEmpty (BUILD_NUMBER)
? $"{PREVIEW_LABEL}"
@@ -107,6 +108,14 @@ foreach (var arg in CAKE_ARGUMENTS) {
Information($" {arg.Key.PadRight(30)} {{0}}", arg.Value);
}
+Information("Source Control:");
+Information($" {"PREVIEW_LABEL".PadRight(30)} {{0}}", PREVIEW_LABEL);
+Information($" {"FEATURE_NAME".PadRight(30)} {{0}}", FEATURE_NAME);
+Information($" {"BUILD_NUMBER".PadRight(30)} {{0}}", BUILD_NUMBER);
+Information($" {"GIT_SHA".PadRight(30)} {{0}}", GIT_SHA);
+Information($" {"GIT_BRANCH_NAME".PadRight(30)} {{0}}", GIT_BRANCH_NAME);
+Information($" {"GIT_URL".PadRight(30)} {{0}}", GIT_URL);
+
#load "cake/msbuild.cake"
#load "cake/UtilsManaged.cake"
#load "cake/externals.cake"
@@ -600,6 +609,27 @@ Task ("nuget-normal")
}
}
+ //
+ var repository = metadata.Element ("repository");
+ if (repository == null) {
+ repository = new XElement ("repository");
+ metadata.Add (repository);
+ }
+ repository.SetAttributeValue ("type", "git");
+ repository.SetAttributeValue ("url", GIT_URL);
+ repository.SetAttributeValue ("branch", GIT_BRANCH_NAME);
+ repository.SetAttributeValue ("commit", GIT_SHA);
+
+ //
+ if (id != null && version != null) {
+ var v = GetVersion (id.Value);
+ if (!string.IsNullOrEmpty (v)) {
+ if (id.Value.StartsWith("SkiaSharp") || id.Value.StartsWith("HarfBuzzSharp"))
+ v += suffix;
+ version.Value = v;
+ }
+ }
+
//
var dependencies = metadata
.Elements ("dependencies")
diff --git a/nuget/HarfbuzzSharp.nuspec b/nuget/HarfbuzzSharp.nuspec
index b613a725c5..172a82f3dd 100644
--- a/nuget/HarfbuzzSharp.nuspec
+++ b/nuget/HarfbuzzSharp.nuspec
@@ -73,36 +73,52 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nuget/SkiaSharp.HarfBuzz.nuspec b/nuget/SkiaSharp.HarfBuzz.nuspec
index cd05c93ff4..24b72250af 100644
--- a/nuget/SkiaSharp.HarfBuzz.nuspec
+++ b/nuget/SkiaSharp.HarfBuzz.nuspec
@@ -46,10 +46,13 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
diff --git a/nuget/SkiaSharp.Views.Desktop.Common.nuspec b/nuget/SkiaSharp.Views.Desktop.Common.nuspec
index 8539bf47bd..fd2709ef80 100644
--- a/nuget/SkiaSharp.Views.Desktop.Common.nuspec
+++ b/nuget/SkiaSharp.Views.Desktop.Common.nuspec
@@ -46,10 +46,13 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
diff --git a/nuget/SkiaSharp.Views.Forms.GTK.nuspec b/nuget/SkiaSharp.Views.Forms.GTK.nuspec
index 8731c9f8ae..bda4949cae 100644
--- a/nuget/SkiaSharp.Views.Forms.GTK.nuspec
+++ b/nuget/SkiaSharp.Views.Forms.GTK.nuspec
@@ -43,6 +43,7 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
diff --git a/nuget/SkiaSharp.Views.Forms.WPF.nuspec b/nuget/SkiaSharp.Views.Forms.WPF.nuspec
index 1c3cb5352e..785bd5a658 100644
--- a/nuget/SkiaSharp.Views.Forms.WPF.nuspec
+++ b/nuget/SkiaSharp.Views.Forms.WPF.nuspec
@@ -56,8 +56,10 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
diff --git a/nuget/SkiaSharp.Views.Forms.nuspec b/nuget/SkiaSharp.Views.Forms.nuspec
index 616e109a29..c000404e09 100644
--- a/nuget/SkiaSharp.Views.Forms.nuspec
+++ b/nuget/SkiaSharp.Views.Forms.nuspec
@@ -29,30 +29,37 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
+
+
@@ -107,32 +114,44 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nuget/SkiaSharp.Views.Gtk2.nuspec b/nuget/SkiaSharp.Views.Gtk2.nuspec
index 90e3b7dd47..7bf6c2642d 100644
--- a/nuget/SkiaSharp.Views.Gtk2.nuspec
+++ b/nuget/SkiaSharp.Views.Gtk2.nuspec
@@ -38,6 +38,7 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
diff --git a/nuget/SkiaSharp.Views.Gtk3.nuspec b/nuget/SkiaSharp.Views.Gtk3.nuspec
index 0495807ac1..dcc0210c42 100644
--- a/nuget/SkiaSharp.Views.Gtk3.nuspec
+++ b/nuget/SkiaSharp.Views.Gtk3.nuspec
@@ -39,6 +39,7 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
diff --git a/nuget/SkiaSharp.Views.Maui.Controls.Compatibility.nuspec b/nuget/SkiaSharp.Views.Maui.Controls.Compatibility.nuspec
index df0701e153..266832f203 100644
--- a/nuget/SkiaSharp.Views.Maui.Controls.Compatibility.nuspec
+++ b/nuget/SkiaSharp.Views.Maui.Controls.Compatibility.nuspec
@@ -49,10 +49,15 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
diff --git a/nuget/SkiaSharp.Views.Maui.Controls.nuspec b/nuget/SkiaSharp.Views.Maui.Controls.nuspec
index 92e181f4c4..ce2e24db0b 100644
--- a/nuget/SkiaSharp.Views.Maui.Controls.nuspec
+++ b/nuget/SkiaSharp.Views.Maui.Controls.nuspec
@@ -49,10 +49,15 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
diff --git a/nuget/SkiaSharp.Views.Maui.Core.nuspec b/nuget/SkiaSharp.Views.Maui.Core.nuspec
index 4369369b1d..e7c8d80b70 100644
--- a/nuget/SkiaSharp.Views.Maui.Core.nuspec
+++ b/nuget/SkiaSharp.Views.Maui.Core.nuspec
@@ -53,10 +53,15 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
diff --git a/nuget/SkiaSharp.Views.Uno.nuspec b/nuget/SkiaSharp.Views.Uno.nuspec
index 437a395e02..c6ffca8ca7 100644
--- a/nuget/SkiaSharp.Views.Uno.nuspec
+++ b/nuget/SkiaSharp.Views.Uno.nuspec
@@ -56,16 +56,22 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
+
diff --git a/nuget/SkiaSharp.Views.WPF.nuspec b/nuget/SkiaSharp.Views.WPF.nuspec
index 43f1257a2a..df8934fa19 100644
--- a/nuget/SkiaSharp.Views.WPF.nuspec
+++ b/nuget/SkiaSharp.Views.WPF.nuspec
@@ -42,8 +42,10 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
diff --git a/nuget/SkiaSharp.Views.WinUI.nuspec b/nuget/SkiaSharp.Views.WinUI.nuspec
index 9537cccc23..5bf28d1ce2 100644
--- a/nuget/SkiaSharp.Views.WinUI.nuspec
+++ b/nuget/SkiaSharp.Views.WinUI.nuspec
@@ -38,6 +38,7 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
diff --git a/nuget/SkiaSharp.Views.WindowsForms.nuspec b/nuget/SkiaSharp.Views.WindowsForms.nuspec
index 2e331c474d..6062579301 100644
--- a/nuget/SkiaSharp.Views.WindowsForms.nuspec
+++ b/nuget/SkiaSharp.Views.WindowsForms.nuspec
@@ -46,8 +46,10 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
diff --git a/nuget/SkiaSharp.Views.nuspec b/nuget/SkiaSharp.Views.nuspec
index 498a87e4e0..dbe44ed74e 100644
--- a/nuget/SkiaSharp.Views.nuspec
+++ b/nuget/SkiaSharp.Views.nuspec
@@ -77,30 +77,43 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/nuget/SkiaSharp.Vulkan.SharpVk.nuspec b/nuget/SkiaSharp.Vulkan.SharpVk.nuspec
index c14d7e142c..55a7d3ef19 100644
--- a/nuget/SkiaSharp.Vulkan.SharpVk.nuspec
+++ b/nuget/SkiaSharp.Vulkan.SharpVk.nuspec
@@ -38,6 +38,7 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
diff --git a/nuget/SkiaSharp.nuspec b/nuget/SkiaSharp.nuspec
index 5d147fcbec..60e08dd5c0 100644
--- a/nuget/SkiaSharp.nuspec
+++ b/nuget/SkiaSharp.nuspec
@@ -93,36 +93,52 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml
index 1a17b00eb5..66978b4951 100644
--- a/scripts/azure-pipelines.yml
+++ b/scripts/azure-pipelines.yml
@@ -14,7 +14,8 @@ variables:
FEATURE_NAME_PREFIX: 'feature/'
VERBOSITY: normal
GIT_SHA: $(Build.SourceVersion)
- GIT_BRANCH_NAME: $(Build.SourceBranchName)
+ GIT_BRANCH_NAME: $(Build.SourceBranch)
+ GIT_URL: $(Build.Repository.Uri)
FEATURE_NAME: ''
PREVIEW_LABEL: 'preview'
BUILD_NUMBER: $[counter(format('_{0}_{1}_{2}__', variables['SKIASHARP_VERSION'], variables['Build.SourceBranch'], variables['PREVIEW_LABEL']), 1)]
diff --git a/source/SkiaSharp.Build.props b/source/SkiaSharp.Build.props
index 84df9a5674..7cce78357a 100644
--- a/source/SkiaSharp.Build.props
+++ b/source/SkiaSharp.Build.props
@@ -30,6 +30,10 @@
True
+
+ true
+
+
$(DefineConstants);THROW_OBJECT_EXCEPTIONS
diff --git a/source/SkiaSharp.Build.targets b/source/SkiaSharp.Build.targets
index 8334c582a6..b701155c02 100644
--- a/source/SkiaSharp.Build.targets
+++ b/source/SkiaSharp.Build.targets
@@ -69,6 +69,13 @@
+
+
+
+
+