OpenRCT2/scripts/setenv

73 lines
2.3 KiB
Text
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.5 - Feature: [#18713] Block brakes have speed control and brakes slower than adjacent block brakes copy block brake speed when block brake open. - Feature: [#19276] Add Powered Lifthill to Giga Coaster. - Feature: [#19305] Add new Reversed Trains ride setting to run trains backwards, granting a bonus to ride ratings. - Feature: [#19305] [Plugin] Add “Car.isReversed” to allow individual ride vehicles to run backwards. - Feature: [#19446] Add new color options to color dropdown. - Feature: [#19547] Add large sloped turns to hybrid coaster and single rail coaster. - Feature: [#19930] Add plugin APIs for research. - Feature: [OpenMusic#25] Added Prehistoric ride music style. - Feature: [OpenMusic#26] Fairground Organ style 2 with new recordings from Herman's 35er Voigt (Previously known as Bressingham Voigt). - Feature: [OpenMusic#28] Add Ragtime style 2 ride music. - Improved: [#17739] Raise water and land height limits to 254 units/182m/600ft. - Improved: [#18490] Reduce guests walking through trains on level crossing next to station. - Improved: [#18996] When marketing campaigns are disabled, disable the Marketing tab in the Finances window. - Improved: [#19764] Miscellaneous scenery tab now grouped next to the all-scenery tab. - Improved: [#19830] “Highlight path issues” will now hide wall elements. - Improved: [#19905] Add prompt before resetting shortcut keys. - Improved: [#19952] Add colour preset to Spiral Slide using the new colour options. - Improved: [#19953] Add keyboard shortcut to Keyboard Shortcuts window. - Improved: [#20055] Performance improvement for the software renderer. - Change: [OpenSFX#17] Update Hybrid RC lifthill loop. - Fix: [#12598] Number of holes is not set correctly when saving track designs. - Fix: [#13130] Android always defaulting to UK locale for language, currency and temperature. - Fix: [#13397] Ride simulation causes strange station behaviour and makes the ride unusable in some cases. - Fix: [#16791] Rotodrop top piece replicates when walls are placed around it and clearance checks are disabled (original bug). - Fix: [#18583] Land dropdown is incorrect if there are surface entry index holes. - Fix: [#18895] Responding mechanic blocked at level crossing. - Fix: [#19231] Crash due to null pointer to previously deleted banner in tile copy/paste functionality. - Fix: [#19296] Crash due to a race condition for parallel object loading. - Fix: [#19733] Favorite ride of X guests integer overflow. - Fix: [#19756] Crash with title sequences containing no commands. - Fix: [#19767] No message when path is not connected to ride exit and is therefore unreachable for mechanics. - Fix: [#19800] Crash when displaying station stats with more than 62 stations. - Fix: [#19801] The in-game load/save window cannot be resized anymore. - Fix: [#19854] Looping Coaster trains clipping through steep quarter turns down. - Fix: [#19858] Issue drawing simulate flag icon on alternate colour palettes. - Fix: [#19901] Random shop colours never assigning last colour. - Fix: [#19911] Guests stuck at certain railway crossings. - Fix: [#19924] Destructible cheat does not allow partial ride modification. - Fix: [#19950] Mine train block brake supports drawn incorrectly. - Fix: [#19955] Mine Train Roller Coaster has incorrect supports on the sloped left small turn (original bug). - Fix: [#19987] [Plugin] ‘SetCheatAction’ has wrong ID in plugin API. - Fix: [#20016] The group box for small scenery details in the Tile Inspector window has unused empty space. - Fix: [#20018] Shops not calculating up-keep cost. - Fix: [#20033] Asset packs cannot reference game data. - Fix: [#20104] [Plugin] Some network APIs use player index and group index. - Fix: [#20099] Some scrollbar is glitched or have incorrect size when open window for the first time - Fix: [#20134] Grass length being updated for tiles in the void, causing unneccesary drawing operations.
2023-05-08 13:02:02 +02:00
export OPENRCT2_VERSION=0.4.5
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