Call setup after upstream merge and ensure branch

This commit is contained in:
su-ex 2020-11-03 02:07:14 +01:00
parent 7cfef33376
commit 511bc6a2bc
No known key found for this signature in database
GPG Key ID: D743C50C8B61984C
3 changed files with 22 additions and 2 deletions

View File

@ -59,8 +59,8 @@ cd schildichat-desktop
## Build ## Build
`make` `make [{web|debian|pacman|windows}-release]`
## Install ## Install
Installable packages should appear in element-desktop/dist/. Installable packages should appear in release/.

View File

@ -37,3 +37,18 @@ forall_repos() {
"$@" "$@"
popd popd
} }
ensure_yes() {
read -e -p "$1 [y/N] " choice
if [[ "$choice" != [Yy]* ]]; then
exit 1
fi
}
check_branch() {
if [[ $(git branch --show-current) != "$1" ]]; then
repo_name=$(basename `git rev-parse --show-toplevel`)
ensure_yes "$repo_name not in branch $1. Continue?"
fi
}

View File

@ -3,13 +3,18 @@
set -e set -e
mydir="$(dirname "$(realpath "$0")")" mydir="$(dirname "$(realpath "$0")")"
branch=${BRANCH:-"sc"}
pushd "$mydir" > /dev/null pushd "$mydir" > /dev/null
source ./merge_helpers.sh source ./merge_helpers.sh
check_branch $branch
forall_repos check_branch $branch
forall_repos git fetch upstream forall_repos git fetch upstream
forall_repos git merge upstream/master forall_repos git merge upstream/master
./setup.sh
popd > /dev/null popd > /dev/null