summaryrefslogtreecommitdiff
path: root/src/SMAPI.ModBuildConfig/Tasks
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-10-08 02:13:08 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-10-08 02:13:08 -0400
commitca58da37cd8cd9818b71a2b67b5186e7ab81a73c (patch)
tree7cc0b9b3b60203254ffa1ebe75636c8394a8e5dd /src/SMAPI.ModBuildConfig/Tasks
parente2e7e096b7f62eb6a5145970ecac3b7edc0bfef1 (diff)
downloadSMAPI-ca58da37cd8cd9818b71a2b67b5186e7ab81a73c.tar.gz
SMAPI-ca58da37cd8cd9818b71a2b67b5186e7ab81a73c.tar.bz2
SMAPI-ca58da37cd8cd9818b71a2b67b5186e7ab81a73c.zip
add prerelease tag to zip name & normalise version format
Diffstat (limited to 'src/SMAPI.ModBuildConfig/Tasks')
-rw-r--r--src/SMAPI.ModBuildConfig/Tasks/CreateModReleaseZip.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/SMAPI.ModBuildConfig/Tasks/CreateModReleaseZip.cs b/src/SMAPI.ModBuildConfig/Tasks/CreateModReleaseZip.cs
index c8582488..26f2ed44 100644
--- a/src/SMAPI.ModBuildConfig/Tasks/CreateModReleaseZip.cs
+++ b/src/SMAPI.ModBuildConfig/Tasks/CreateModReleaseZip.cs
@@ -6,6 +6,7 @@ using System.Linq;
using System.Web.Script.Serialization;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
+using StardewModdingAPI.Common;
namespace StardewModdingAPI.ModBuildConfig.Tasks
{
@@ -115,8 +116,9 @@ namespace StardewModdingAPI.ModBuildConfig.Tasks
int major = versionFields.ContainsKey("MajorVersion") ? (int)versionFields["MajorVersion"] : 0;
int minor = versionFields.ContainsKey("MinorVersion") ? (int)versionFields["MinorVersion"] : 0;
int patch = versionFields.ContainsKey("PatchVersion") ? (int)versionFields["PatchVersion"] : 0;
+ string tag = versionFields.ContainsKey("Build") ? (string)versionFields["Build"] : null;
- return $"{major}.{minor}.{patch}";
+ return new SemanticVersionImpl(major, minor, patch, tag).ToString();
}
/// <summary>Get a case-insensitive dictionary matching the given JSON.</summary>