2020-09-08 18:14:39 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-09-08 18:53:10 +02:00
|
|
|
mydir="$(dirname "$(realpath "$0")")"
|
|
|
|
source "$mydir/merge_helpers.sh"
|
2020-09-08 18:14:39 +02:00
|
|
|
|
2020-09-08 18:53:10 +02:00
|
|
|
# Require clean git state
|
|
|
|
require_clean_git
|
2020-09-08 18:14:39 +02:00
|
|
|
|
2020-09-08 18:53:10 +02:00
|
|
|
# Oposite of restore_sc in post_merge.sh
|
2020-09-08 18:14:39 +02:00
|
|
|
restore_upstream() {
|
|
|
|
local f="$(basename "$1")"
|
|
|
|
local path="$(dirname "$1")"
|
|
|
|
local sc_f="tmp_sc_$f"
|
|
|
|
local upstream_f="upstream_$f"
|
|
|
|
mv "$path/$f" "$path/$sc_f"
|
|
|
|
if [ -e "$path/$upstream_f" ]; then
|
|
|
|
mv "$path/$upstream_f" "$path/$f"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2020-12-12 14:14:04 +01:00
|
|
|
# Revert Schildi's upstream string changes
|
|
|
|
git checkout `upstream_previous_tag` -- `find "$mydir/vector/src/main/res" -name strings.xml`
|
|
|
|
git commit -m "Automatic revert to unchanged upstream strings, pt.1"
|
2020-09-08 18:14:39 +02:00
|
|
|
|
2020-09-08 18:53:10 +02:00
|
|
|
# Keep in sync with post_merge.sh!
|
2020-11-25 09:29:16 +01:00
|
|
|
restore_upstream .github
|
2020-09-08 18:14:39 +02:00
|
|
|
restore_upstream fastlane
|
|
|
|
restore_upstream README.md
|
2020-09-08 18:53:10 +02:00
|
|
|
|
2020-09-08 18:14:39 +02:00
|
|
|
git add -A
|
|
|
|
git commit -m "[TMP] Automatic upstream merge preparation"
|