From f4ca7dd228390f030735195357e81e5170bcd474 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sun, 5 Dec 2021 18:55:10 -0500 Subject: add Windows build process to fix application icon until .NET bug is fixed --- build/windows/set-smapi-version.ps1 | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build/windows/set-smapi-version.ps1 (limited to 'build/windows/set-smapi-version.ps1') diff --git a/build/windows/set-smapi-version.ps1 b/build/windows/set-smapi-version.ps1 new file mode 100644 index 00000000..ff6b2096 --- /dev/null +++ b/build/windows/set-smapi-version.ps1 @@ -0,0 +1,25 @@ +# +# +# This is the PowerShell equivalent of ../unix/set-smapi-version.sh. +# When making changes, both scripts should be updated. +# +# + + +. "$PSScriptRoot\lib\in-place-regex.ps1" + +# get version number +$version=$args[0] +if (!$version) { + $version = Read-Host "SMAPI release version (like '4.0.0')" +} + +# move to SMAPI root +cd "$PSScriptRoot/../.." + +# apply changes +In-Place-Regex -Path "build/common.targets" -Search ".+" -Replace "$version" +In-Place-Regex -Path "src/SMAPI/Constants.cs" -Search "RawApiVersion = `".+?`";" -Replace "RawApiVersion = `"$version`";" +ForEach ($modName in "ConsoleCommands","ErrorHandler","SaveBackup") { + In-Place-Regex -Path "src/SMAPI.Mods.$modName/manifest.json" -Search "`"(Version|MinimumApiVersion)`": `".+?`"" -Replace "`"`$1`": `"$version`"" +} -- cgit