From 3e545b2c1350108239ca392d1902002c0099c201 Mon Sep 17 00:00:00 2001 From: Aigio Liu Date: Tue, 7 Dec 2021 19:51:11 +0800 Subject: [PATCH] pub tool IsUseCustomVersion --- src/ST.Tools.Publish/Utils.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ST.Tools.Publish/Utils.cs b/src/ST.Tools.Publish/Utils.cs index 379602e53..501abba7e 100644 --- a/src/ST.Tools.Publish/Utils.cs +++ b/src/ST.Tools.Publish/Utils.cs @@ -249,6 +249,7 @@ namespace System.Application } static string? mVersion; + public static bool IsUseCustomVersion => mVersion != null; public static string Version { [Obsolete("use GetVersion(bool)")] @@ -286,9 +287,9 @@ namespace System.Application var fileName = item.DeploymentMode switch { DeploymentMode.SCD => - $"Steam++_{name}_v{version}{fileEx}", + $"Steam++_{name}_{(IsUseCustomVersion ? "" : "v")}{version}{fileEx}", DeploymentMode.FDE => - $"Steam++_{name}_fde_v{version}{fileEx}", + $"Steam++_{name}_fde_{(IsUseCustomVersion ? "" : "v")}{version}{fileEx}", _ => throw new ArgumentOutOfRangeException(nameof(item.DeploymentMode), item.DeploymentMode, null), }; return fileName;