diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-05-25 01:14:40 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2018-05-25 01:14:40 -0400 |
commit | 3129f67eb1f162e06d96854f319b10ccf583f0aa (patch) | |
tree | 67f7063dd4f362b018a677e6e9d3bd1cc66f63da /src/SMAPI.Web/Controllers | |
parent | 2a7bcb28f6a390e165c2cb8817f333aad750a032 (diff) | |
download | SMAPI-3129f67eb1f162e06d96854f319b10ccf583f0aa.tar.gz SMAPI-3129f67eb1f162e06d96854f319b10ccf583f0aa.tar.bz2 SMAPI-3129f67eb1f162e06d96854f319b10ccf583f0aa.zip |
add semantic version to toolkit (#532)
Diffstat (limited to 'src/SMAPI.Web/Controllers')
-rw-r--r-- | src/SMAPI.Web/Controllers/IndexController.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI.Web/Controllers/IndexController.cs b/src/SMAPI.Web/Controllers/IndexController.cs index 08b7363a..0cc3c37a 100644 --- a/src/SMAPI.Web/Controllers/IndexController.cs +++ b/src/SMAPI.Web/Controllers/IndexController.cs @@ -5,7 +5,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Caching.Memory; -using StardewModdingAPI.Internal; +using StardewModdingAPI.Toolkit; using StardewModdingAPI.Web.Framework.Clients.GitHub; using StardewModdingAPI.Web.ViewModels; @@ -105,7 +105,7 @@ namespace StardewModdingAPI.Web.Controllers foreach (GitAsset asset in release.Assets) { Match match = Regex.Match(asset.FileName, @"SMAPI-(?<version>[\d\.]+(?:-.+)?)-installer(?<forDevs>-for-developers)?.zip"); - if (!match.Success || !SemanticVersionImpl.TryParse(match.Groups["version"].Value, out SemanticVersionImpl version)) + if (!match.Success || !SemanticVersion.TryParse(match.Groups["version"].Value, out ISemanticVersion version)) continue; bool isBeta = version.Tag != null; bool isForDevs = match.Groups["forDevs"].Success; @@ -127,7 +127,7 @@ namespace StardewModdingAPI.Web.Controllers public GitAsset Asset { get; } /// <summary>The SMAPI version.</summary> - public SemanticVersionImpl Version { get; } + public ISemanticVersion Version { get; } /// <summary>Whether this is a beta download.</summary> public bool IsBeta { get; } @@ -145,7 +145,7 @@ namespace StardewModdingAPI.Web.Controllers /// <param name="version">The SMAPI version.</param> /// <param name="isBeta">Whether this is a beta download.</param> /// <param name="isForDevs">Whether this is a 'for developers' download.</param> - public ReleaseVersion(GitRelease release, GitAsset asset, SemanticVersionImpl version, bool isBeta, bool isForDevs) + public ReleaseVersion(GitRelease release, GitAsset asset, ISemanticVersion version, bool isBeta, bool isForDevs) { this.Release = release; this.Asset = asset; |