OpenRCT2/scripts/setenv

71 lines
2.3 KiB
Plaintext
Raw Normal View History

#!/bin/bash
# This sets up more environment variables using existing the environment
# It should be dot sourced into your environment
if [[ "$GITHUB_ACTIONS" != "true" ]]; then
export OPENRCT2_BUILD_SERVER=$(hostname)
Release v0.3.1 - Feature: [#10807] Add 2x and 4x zoom levels (currently limited to OpenGL). - Feature: [#12703] Add scenario plugin APIs. - Feature: [#12708] Add plugin-accessible names to all game actions. - Feature: [#12712] Add TCP / socket plugin APIs. - Feature: [#12840] Add Park.entranceFee to the plugin API. - Feature: [#12884] Add BaseTileElement.occupiedQuadrants to the plugin API. - Feature: [#12885] Add SmallSceneryElement.quadrant to the plugin API. - Feature: [#12886] Make all scenery placement and remove actions available to the plugin API. - Feature: [#2350, #12922] Add snow, heavy snow and blizzard to weather types. - Fix: [#400] Unable to place some saved tracks flush to the ground (original bug). - Fix: [#5753] Entertainers make themselves happy instead of the guests. - Fix: [#7037] Unable to save tracks starting with a sloped turn or helix. - Fix: [#12691] Ride graph tooltip incorrectly used count instead of number string. - Fix: [#12694] Crash when switching ride types with construction window open. - Fix: [#12701] Silent NSIS setup flag /S isn't silent, upgrade pop-up appears anyway. - Fix: [#12737] Space Rings draw the same vehicle 4 times. - Fix: [#12756] Scenario Editor crashing the game on macOS. - Fix: [#12764] Rides don't start aged anymore. - Fix: [#12818] Ride price not ignored in free-rides parks. - Fix: [#12820] Title menu buttons not invalidating properly - Fix: [#12845] Deleting ride with active ad campaign creates incorrect notification. - Fix: [#12857] Incorrect Peep thoughts in imported RCT1 parks. - Fix: [#12881] Guests' favourite rides are not listed in the guest window. - Fix: [#12910] Plugin API: getRide sometimes returns null for valid ride IDs. - Fix: [#12912] Plugin: selectedCell of CustomListView is being ignored on creation. - Fix: [#12918] Cannot place vanilla TD6 tracks of the Hypercoaster, Monster Trucks, Classic Mini Roller Coaster, Spinning Wild Mouse and Hyper-Twister types. - Fix: Incomplete loop collision box allowed overlapping track (original bug). - Improved: [#12806] Add Esperanto diacritics to the sprite font. - Improved: [#12837] Arabic text is now drawn and shaped correctly on Windows. - Improved: [#12890] Add stroke to lowercase 'L' to differentiate from capital 'I'. - Technical: [#12749] The required version of macOS has been lowered to 10.13 (High Sierra).
2020-09-27 22:57:34 +02:00
export OPENRCT2_VERSION=0.3.1
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)
export OPENRCT2_DESCRIBE=$(git describe HEAD)
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
export OPENRCT2_TAG=
export OPENRCT2_PUSH=
if [[ $GITHUB_REF == refs/tags/* ]]; then
export 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 [[ "$OPENRCT2_ORG_TOKEN" == "" ]]; then
export OPENRCT2_PUSH=
fi
# Get the short SHA1
export OPENRCT2_SHA1=$GITHUB_SHA
export OPENRCT2_SHA1_SHORT=${OPENRCT2_SHA1:0:7}
export 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"
# 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