Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit 0b16e85

Browse files
+ Read releaseVersion variable from json file #19
1 parent f560662 commit 0b16e85

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SubPointSolutions.CakeBuildTools/Scripts/SubPointSolutions.CakeBuild.Core.cake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,6 +1404,7 @@ var defaultActionGitHubReleaseNotes = Task("Action-GitHub-ReleaseNotes")
14041404
releaseTitle = System.IO.Path.GetFileNameWithoutExtension(defaultSolutionFilePath);
14051405
}
14061406

1407+
// get releaseVersion from one of the defaultNuspecs?
14071408
if(String.IsNullOrEmpty(releaseVersion) && defaultNuspecs.Count > 0)
14081409
{
14091410
var nuSpec = defaultNuspecs.First();
@@ -1417,9 +1418,13 @@ var defaultActionGitHubReleaseNotes = Task("Action-GitHub-ReleaseNotes")
14171418
releaseVersion = GetVersionForNuGetPackage(id, ciBranch);
14181419
}
14191420

1421+
// fall back on defaultNuspecVersion
1422+
if(String.IsNullOrEmpty(releaseVersion))
1423+
releaseVersion = defaultNuspecVersion;
1424+
14201425
if(String.IsNullOrEmpty(releaseVersion))
14211426
{
1422-
throw new Exception("releaseVersion is null or empty. Can't get it from 'ci.github.releaseversion' or any of NuSpec files");
1427+
throw new Exception("releaseVersion is null or empty. Can't get it from 'ci.github.releaseversion', any of NuSpec files or defaultNuspecVersion");
14231428
}
14241429

14251430
Information(String.Format("-githubCompanyName:[{0}]",githubCompanyName));

0 commit comments

Comments
 (0)