From 54b9cbd6536bb23d6ff1e0c07b73ec4f8bf188b7 Mon Sep 17 00:00:00 2001 From: SpiritCroc Date: Thu, 5 Nov 2020 16:11:32 +0100 Subject: [PATCH] alternative_package.sh: Auto-commit, check, if git is clean Change-Id: Ieae93761dc51c1c141d138a34c6ae01dfef557d2 --- alternative_package.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/alternative_package.sh b/alternative_package.sh index 9e7ecb7edf..6cec4db6ba 100755 --- a/alternative_package.sh +++ b/alternative_package.sh @@ -6,11 +6,15 @@ package_add="$1" name_add="$2" mydir="$(dirname "$(realpath "$0")")" +source "$mydir/merge_helpers.sh" + if [ -z "$package_add" ] || [ -z "$name_add" ]; then echo "Usage: $0 " exit 1 fi +require_clean_git + build_gradle="$mydir/vector/build.gradle" src_dir="$mydir/vector/src" fastlane_dir="$mydir/fastlane" @@ -75,3 +79,6 @@ esac sed -i "s|SchildiChat|SchildiChat.$name_add|g" "$build_gradle" sed -i "s|de.spiritcroc.riotx|de.spiritcroc.riotx.$package_add|g" "$build_gradle" `find "$src_dir" -name google-services.json` sed -i "s|SchildiChat|SchildiChat.$name_add|g" `find "$fastlane_dir/metadata/android" -name "title.txt"` + +git add -A +git commit -m "Switch to alternative $name_add ($package_add)"