OpenRCT2/scripts/setenv

73 lines
2.3 KiB
Plaintext
Raw Normal View History

#!/usr/bin/env bash
set -e
2021-04-15 00:34:52 +02:00
# This sets up more environment variables using the existing environment
# It should be dot sourced into your environment
if [[ "$GITHUB_ACTIONS" != "true" ]]; then
export OPENRCT2_BUILD_SERVER=$(hostname)
Release v0.4.8 - Feature: [#21062] [Plugin] Add API for managing a guest's items. - Improved: [#18632, #21306] Land ownership and construction rights are now shown on top of the water. - Improved: [#20951] Activate OpenRCT2 window after using native file dialog on macOS. - Improved: [#21184] The construction marker for rides, paths and large scenery is now shown on top of the water. - Improved: [#21192] Tooltips will now follow the cursor. - Improved: [#21227] Entrance style dropdown is now sorted alphabetically everywhere. - Change: [#21200] Raise maximum lift speeds of the Reverser Coaster, Side Friction Coaster, and Virginia Reel for RCT1 parity. - Change: [#21225] Raise maximum allowed misc entities to 1600. - Fix: [#19494] RCT1 fence gate walls not imported properly if they were placed on slopes. - Fix: [#20196] New scenarios start with an incorrect temperature. - Fix: [#20255] Images from the last hovered-over coaster in the object selection are not freed. - Fix: [#20616] Confirmation button in the track designer’s quit prompt has the wrong text. - Fix: [#20628] Moving caret using Ctrl+left can move too far when using a multibyte grapheme. - Fix: [#20631] IME window not positioned correctly. - Fix: [#20845] Trying to save under a folder with no write permissions causes a crash. - Fix: [#21054] “No entrance” style is selected by default in the track designer. - Fix: [#21145] [Plugin] setInterval/setTimeout handle conflict. - Fix: [#21157] [Plugin] Widgets do not redraw correctly when updating disabled or visibility state. - Fix: [#21158] [Plugin] Potential crash using setInterval/setTimeout within the callback. - Fix: [#21171] [Plugin] Crash creating entities with no more entity slots available. - Fix: [#21178] Inca Lost City’s scenario description incorrectly states there are height restrictions. - Fix: [#21179] Additional missing land/construction rights tiles in Inca Lost City & Renovation. - Fix: [#21198] [Plugin] Setting brake or booster speeds on a tile element doesn’t work. - Fix: [#21290] Sound keeps playing when paused from fast-forward mode. - Fix: [#21291] Hungry guests heading to any flat ride do not count for warning threshold (original bug). - Fix: [#21309] Africa - Oasis & Blackpool Pleasure Beach’s monorails are built outside the park’s land rights. - Fix: [#21316] Isolated land for sale tile on Extreme Hawaiian Island.
2024-02-04 15:29:56 +01:00
export OPENRCT2_VERSION=0.4.8
GITHUB_REF=$(git rev-parse --symbolic-full-name HEAD)
GITHUB_SHA=$(git rev-parse HEAD)
fi
echo -e "\033[0;36mSetting up environment for OpenRCT2...\033[0m"
# Get the build number (number of commits since last tag)
get_build_number()
{
local pattern='.+-([0-9]+)-.+'
[[ $OPENRCT2_DESCRIBE =~ $pattern ]]
echo "${BASH_REMATCH[1]}"
}
export OPENRCT2_BUILD=$(get_build_number)
# Get the name of the branch and decide whether we should push the build to openrct2.org
unset OPENRCT2_TAG
unset OPENRCT2_PUSH
if [[ $GITHUB_REF == refs/tags/* ]]; then
unset OPENRCT2_BRANCH
export OPENRCT2_TAG=true
export OPENRCT2_PUSH=true
else
export OPENRCT2_BRANCH=${GITHUB_REF#refs/heads/}
if [[ "$OPENRCT2_BRANCH" =~ ^(develop|push/) ]]; then
export OPENRCT2_PUSH=true
fi
fi
if [[ -z "$OPENRCT2_ORG_TOKEN" ]]; then
unset OPENRCT2_PUSH
fi
# Get the short SHA1
export OPENRCT2_SHA1=$GITHUB_SHA
2022-03-11 12:31:07 +01:00
export OPENRCT2_SHA1_SHORT=${OPENRCT2_SHA1::7}
unset OPENRCT2_VERSION_EXTRA
if [[ "$OPENRCT2_TAG" != "true" ]]; then
export OPENRCT2_VERSION_EXTRA=$OPENRCT2_BRANCH-$OPENRCT2_SHA1_SHORT
fi
# Add scripts directory to PATH
realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$(pwd)/${1#./}"
}
scriptsdir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
export PATH="$scriptsdir:$PATH"
2021-02-10 22:35:04 +01:00
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
# Output all the variables
if [[ "$1" != "-q" ]]; then
echo "----------------------------------------------"
echo "OPENRCT2_BUILD_SERVER: $OPENRCT2_BUILD_SERVER"
echo "OPENRCT2_TAG: $OPENRCT2_TAG"
echo "OPENRCT2_BRANCH: $OPENRCT2_BRANCH"
echo "OPENRCT2_VERSION: $OPENRCT2_VERSION"
echo "OPENRCT2_VERSION_EXTRA: $OPENRCT2_VERSION_EXTRA"
echo "OPENRCT2_BUILD: $OPENRCT2_BUILD"
echo "OPENRCT2_DESCRIBE: $OPENRCT2_DESCRIBE"
echo "OPENRCT2_PUSH: $OPENRCT2_PUSH"
echo "OPENRCT2_SHA1: $OPENRCT2_SHA1"
echo "OPENRCT2_SHA1_SHORT: $OPENRCT2_SHA1_SHORT"
echo "----------------------------------------------"
fi