2020-09-08 19:53:10 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
mydir="$(dirname "$(realpath "$0")")"
|
|
|
|
source "$mydir/merge_helpers.sh"
|
|
|
|
|
|
|
|
# Require clean git state
|
|
|
|
require_clean_git
|
|
|
|
|
|
|
|
# Oposite of restore_upstream in post_merge.sh
|
|
|
|
restore_sc() {
|
|
|
|
local f="$(basename "$1")"
|
|
|
|
local path="$(dirname "$1")"
|
|
|
|
local sc_f="tmp_sc_$f"
|
|
|
|
local upstream_f="upstream_$f"
|
|
|
|
if [ -e "$path/$f" ]; then
|
|
|
|
mv "$path/$f" "$path/$upstream_f"
|
|
|
|
fi
|
|
|
|
if [ -e "$path/$sc_f" ]; then
|
|
|
|
mv "$path/$sc_f" "$path/$f"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-11-29 14:52:07 +03:00
|
|
|
# Color corrections | TODO more?
|
|
|
|
sed -i 's|@color/riotx_accent|?colorAccent|g' vector/src/main/res/layout/*
|
|
|
|
uncommitted=`git status --porcelain`
|
|
|
|
if [ -z "$uncommitted" ]; then
|
|
|
|
echo "Seems like colors are still fine :)"
|
|
|
|
else
|
|
|
|
git add -A
|
|
|
|
git commit -m 'Automatic color correction'
|
|
|
|
fi
|
2020-09-08 19:53:10 +03:00
|
|
|
|
|
|
|
# Keep in sync with pre_merge.sh!
|
|
|
|
restore_sc README.md
|
|
|
|
restore_sc fastlane
|
2020-11-25 11:29:16 +03:00
|
|
|
restore_sc .github
|
2020-09-08 19:53:10 +03:00
|
|
|
|
|
|
|
git add -A
|
|
|
|
git commit -m "Automatic upstream merge postprocessing"
|
|
|
|
|
2020-12-12 16:14:04 +03:00
|
|
|
revert_last 'Automatic revert to unchanged upstream strings, pt.1' || \
|
|
|
|
read -p "Please resolve conflicts and commit, then press enter"
|
2020-09-08 19:53:10 +03:00
|
|
|
|
|
|
|
"$mydir"/correct_strings.sh
|
|
|
|
|
|
|
|
|
|
|
|
while grep -q "wolpertinger\|schlumpfwesen" "$mydir/vector/src/main/res/values-de/strings.xml"; do
|
|
|
|
read -p "Please resolve remaining language, then press enter!"
|
|
|
|
done
|
|
|
|
|
|
|
|
uncommitted=`git status --porcelain`
|
|
|
|
if [ -z "$uncommitted" ]; then
|
|
|
|
echo "Seems like no new language conflicts appeared :)"
|
|
|
|
else
|
|
|
|
git add -A
|
|
|
|
git commit -m 'Resolve required manual intervention in german strings'
|
|
|
|
fi
|