From 7819246e433c88987013c585734cfdcfc8267b85 Mon Sep 17 00:00:00 2001 From: AdmiringWorm <kim@chocolatey.io> Date: Thu, 18 Jan 2024 14:33:52 +0100 Subject: [PATCH] (#26) Use milestone for license URL replacement This updates the relpacement used when creating a license URL to make use of the Build Version Milestone, instead of the tag name. This is done as in certain scenarios the tag name is an empty string and will cause an invalid URL to be generated. This causes problems when doing a release of the product, and thus changing to the milestone is more appropriate. --- recipe.cake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipe.cake b/recipe.cake index 496aff2..1ecff61 100644 --- a/recipe.cake +++ b/recipe.cake @@ -41,7 +41,7 @@ Task("Prepare-Chocolatey-Packages") "https://github.com/{0}/{1}/blob/{2}/LICENSE.txt", BuildParameters.RepositoryOwner, BuildParameters.RepositoryName, - BuildParameters.BuildProvider.Repository.Tag.IsTag ? BuildParameters.BuildProvider.Repository.Tag.Name : BuildParameters.BuildProvider.Repository.Branch + BuildParameters.BuildProvider.Repository.Tag.IsTag ? BuildParameters.Version.Milestone : BuildParameters.BuildProvider.Repository.Branch ); var verificationText = string.Format(@"