set SMAPI version from main build script

This commit is contained in:
Jesse Plamondon-Willard 2022-04-29 22:55:12 -04:00
parent a340c8b8ce
commit f507bd0f9c
No known key found for this signature in database
GPG Key ID: CF8B1456B3E29F49
3 changed files with 38 additions and 25 deletions

View File

@ -28,6 +28,20 @@ declare -A msBuildPlatformNames=(["linux"]="Unix" ["macOS"]="OSX" ["windows"]="W
cd "`dirname "$0"`/../.." cd "`dirname "$0"`/../.."
##########
## Set version
##########
# get version number
version="$1"
if [ $# -eq 0 ]; then
echo "SMAPI release version (like '4.0.0'):"
read version
fi
# set version
. ${0%/*}/set-smapi-version.sh "$version"
########## ##########
## Clear old build files ## Clear old build files
########## ##########
@ -190,13 +204,6 @@ done
########## ##########
## Create release zips ## Create release zips
########## ##########
# get version number
version="$1"
if [ $# -eq 0 ]; then
echo "SMAPI release version (like '4.0.0'):"
read version
fi
# rename folders # rename folders
mv "$packagePath" "bin/SMAPI $version installer" mv "$packagePath" "bin/SMAPI $version installer"
mv "$packageDevPath" "bin/SMAPI $version installer for developers" mv "$packageDevPath" "bin/SMAPI $version installer for developers"

View File

@ -12,6 +12,20 @@
. "$PSScriptRoot\lib\in-place-regex.ps1" . "$PSScriptRoot\lib\in-place-regex.ps1"
##########
## Set version
##########
# get version number
$version = $args[0]
if (!$version) {
$version = Read-Host "SMAPI release version (like '4.0.0')"
}
# set version
. "$PSScriptRoot/set-smapi-version.ps1" "$version"
########## ##########
## Constants ## Constants
########## ##########
@ -197,12 +211,6 @@ foreach ($folder in $folders) {
########### ###########
### Create release zips ### Create release zips
########### ###########
# get version number
$version = $args[0]
if (!$version) {
$version = Read-Host "SMAPI release version (like '4.0.0')"
}
# rename folders # rename folders
mv "$packagePath" "bin/SMAPI $version installer" mv "$packagePath" "bin/SMAPI $version installer"
mv "$packageDevPath" "bin/SMAPI $version installer for developers" mv "$packageDevPath" "bin/SMAPI $version installer for developers"

View File

@ -120,8 +120,10 @@ Windows](#on-windows)_ section below to create a build that retains the icon.**
2. Launch the game through the Steam UI. 2. Launch the game through the Steam UI.
### Prepare the release ### Prepare the release
1. Run `build/unix/set-smapi-version.sh` to set the SMAPI version. Make sure you use a [semantic 1. Run `build/unix/prepare-install-package.sh VERSION_HERE` to create the release package in the
version](https://semver.org). Recommended format: root `bin` folder.
Make sure you use a [semantic version](https://semver.org). Recommended format:
build type | format | example build type | format | example
:--------- | :----------------------- | :------ :--------- | :----------------------- | :------
@ -129,9 +131,6 @@ Windows](#on-windows)_ section below to create a build that retains the icon.**
prerelease | `<version>-beta.<date>` | `4.0.0-beta.20251230` prerelease | `<version>-beta.<date>` | `4.0.0-beta.20251230`
release | `<version>` | `4.0.0` release | `<version>` | `4.0.0`
2. Run `build/unix/prepare-install-package.sh` to create the release package in the root `bin`
folder.
### On Windows ### On Windows
#### First-time setup #### First-time setup
1. Set up Windows Subsystem for Linux (WSL): 1. Set up Windows Subsystem for Linux (WSL):
@ -147,8 +146,10 @@ Windows](#on-windows)_ section below to create a build that retains the icon.**
``` ```
### Prepare the release ### Prepare the release
1. Run `build/windows/set-smapi-version.ps1` in PowerShell to set the SMAPI version. Make sure you 1. Run `build/windows/prepare-install-package.ps1 VERSION_HERE` in PowerShell to create the release
use a [semantic version](https://semver.org). Recommended format: package folders in the root `bin` folder.
Make sure you use a [semantic version](https://semver.org). Recommended format:
build type | format | example build type | format | example
:--------- | :----------------------- | :------ :--------- | :----------------------- | :------
@ -156,12 +157,9 @@ Windows](#on-windows)_ section below to create a build that retains the icon.**
prerelease | `<version>-beta.<date>` | `4.0.0-beta.20251230` prerelease | `<version>-beta.<date>` | `4.0.0-beta.20251230`
release | `<version>` | `4.0.0` release | `<version>` | `4.0.0`
2. Run `build/windows/prepare-install-package.ps1` in PowerShell to create the release package 2. Launch WSL and run this script:
folders in the root `bin` folder.
3. Launch WSL and run this script:
```bash ```bash
# edit to match the build created in steps 1-2 # edit to match the build created in steps 1
# In WSL, `/mnt/c/example` accesses `C:\example` on the Windows filesystem. # In WSL, `/mnt/c/example` accesses `C:\example` on the Windows filesystem.
version="4.0.0" version="4.0.0"
binFolder="/mnt/e/source/_Stardew/SMAPI/bin" binFolder="/mnt/e/source/_Stardew/SMAPI/bin"