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/unix/set-smapi-version.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 build/unix/set-smapi-version.sh (limited to 'build/unix/set-smapi-version.sh') diff --git a/build/unix/set-smapi-version.sh b/build/unix/set-smapi-version.sh new file mode 100644 index 00000000..0c0cbeb0 --- /dev/null +++ b/build/unix/set-smapi-version.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# +# +# This is the Bash equivalent of ../windows/set-smapi-version.ps1. +# When making changes, both scripts should be updated. +# +# + + +# get version number +version="$1" +if [ $# -eq 0 ]; then + echo "SMAPI release version (like '4.0.0'):" + read version +fi + +# move to SMAPI root +cd "`dirname "$0"`/../.." + +# apply changes +sed "s/.+<\/Version>/$version<\/Version>/" "build/common.targets" --in-place --regexp-extended +sed "s/RawApiVersion = \".+?\";/RawApiVersion = \"$version\";/" "src/SMAPI/Constants.cs" --in-place --regexp-extended +for modName in "ConsoleCommands" "ErrorHandler" "SaveBackup"; do + sed "s/\"(Version|MinimumApiVersion)\": \".+?\"/\"\1\": \"$version\"/g" "src/SMAPI.Mods.$modName/manifest.json" --in-place --regexp-extended +done -- cgit