Merge pull request #2484 from Xeyame/2.x

Allow using environment variable to set xmx flag in buildtools.sh
This commit is contained in:
md678685 2019-04-16 15:47:23 +01:00 committed by GitHub
commit 05118e9498
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,7 +16,13 @@ ensure_buildtools() {
run_buildtools() {
ensure_buildtools
java -jar BuildTools.jar --rev $1
# Check if env var isnt empty, then run with xmx flag
if [ ! -z "$BUILDTOOLS_XMX" ]; then
echo "BUILDTOOLS_XMX Environment variable found. Running BuildTools with -Xmx$BUILDTOOLS_XMX"
java -Xmx$BUILDTOOLS_XMX -jar BuildTools.jar --rev $1
else
java -jar BuildTools.jar --rev $1
fi
if [ $? -ne 0 ]; then
echo "Running BuildTools for CB $1 failed! Aborting."
popd