Skip to content

Commit 43d7da9

Browse files
committed
Fix NuGet release version
1 parent fc2cde6 commit 43d7da9

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/build.cake

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,12 @@ var publishDir = "./Publish";
5050
Setup(context =>
5151
{
5252
gitVersion = GitVersion(new GitVersionSettings { OutputType = GitVersionOutput.Json });
53-
Information("Informational Version : {0}", gitVersion.InformationalVersion);
54-
Information("SemVer Version : {0}", gitVersion.SemVer);
55-
Information("AssemblySemVer Version: {0}", gitVersion.AssemblySemVer);
56-
Information("NuGet Version : {0}", gitVersion.NuGetVersion);
57-
Information("IsLocalBuild : {0}", local);
53+
Information("Informational Version : {0}", gitVersion.InformationalVersion);
54+
Information("SemVer Version : {0}", gitVersion.SemVer);
55+
Information("AssemblySemVer Version : {0}", gitVersion.AssemblySemVer);
56+
Information("MajorMinorPatch Version: {0}", gitVersion.MajorMinorPatch);
57+
Information("NuGet Version : {0}", gitVersion.NuGetVersion);
58+
Information("IsLocalBuild : {0}", local);
5859

5960
Information(Figlet("MahApps.Metro"));
6061
});
@@ -95,7 +96,7 @@ Task("Paket-Pack")
9596
.Does(() =>
9697
{
9798
EnsureDirectoryExists(Directory(publishDir));
98-
PaketPack(publishDir, new PaketPackSettings { Version = isReleaseBranch ? gitVersion.AssemblySemVer : gitVersion.NuGetVersion });
99+
PaketPack(publishDir, new PaketPackSettings { Version = isReleaseBranch ? gitVersion.MajorMinorPatch : gitVersion.NuGetVersion });
99100
});
100101

101102
Task("Zip-Demos")
@@ -118,8 +119,6 @@ Task("Unit-Tests")
118119
});
119120

120121
Task("CreateRelease")
121-
.WithCriteria(() => !isPullRequest)
122-
.WithCriteria(() => isReleaseBranch)
123122
.WithCriteria(() => !isTagged)
124123
.Does(() =>
125124
{
@@ -136,8 +135,8 @@ Task("CreateRelease")
136135
}
137136

138137
GitReleaseManagerCreate(username, token, "MahApps", "MahApps.Metro", new GitReleaseManagerCreateSettings {
139-
Milestone = gitVersion.SemVer,
140-
Name = gitVersion.SemVer,
138+
Milestone = gitVersion.MajorMinorPatch,
139+
Name = "MahApps.Metro " + gitVersion.MajorMinorPatch,
141140
Prerelease = false,
142141
TargetCommitish = "master",
143142
WorkingDirectory = "../"

0 commit comments

Comments
 (0)