mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-24 16:51:07 +01:00
Move restore_{sc,upstream} to merge_helpers.sh
Easier to use manually Change-Id: Ieb87301e2b0b5d7e1299d3d0c8d49992d4cdde63
This commit is contained in:
parent
15f3974b89
commit
c30a9b8a57
@ -58,3 +58,30 @@ downstream_upstream_diff() {
|
||||
local downstream_tag=`downstream_latest_tag`
|
||||
git diff "$previous_tag".."$downstream_latest_tag" "$@"
|
||||
}
|
||||
|
||||
|
||||
# Opposite to restore_sc
|
||||
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
|
||||
}
|
||||
|
||||
# Oposite to restore_upstream
|
||||
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
|
||||
}
|
||||
|
@ -8,20 +8,6 @@ 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
|
||||
}
|
||||
|
||||
# Color corrections | TODO more?
|
||||
sed -i 's|@color/riotx_accent|?colorAccent|g' vector/src/main/res/layout/*
|
||||
uncommitted=`git status --porcelain`
|
||||
|
12
pre_merge.sh
12
pre_merge.sh
@ -8,18 +8,6 @@ source "$mydir/merge_helpers.sh"
|
||||
# Require clean git state
|
||||
require_clean_git
|
||||
|
||||
# Oposite of restore_sc in post_merge.sh
|
||||
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
|
||||
}
|
||||
|
||||
# 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"
|
||||
|
Loading…
Reference in New Issue
Block a user