From 4b01469a62bc753af9d256d63e81244d424af003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Tue, 8 Sep 2020 15:51:30 +0200 Subject: Migrate to 'main' branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- update.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'update.sh') diff --git a/update.sh b/update.sh index 81989e57..677aa03e 100755 --- a/update.sh +++ b/update.sh @@ -27,6 +27,26 @@ $POEZIO_PYTHON -c 'import venv' &> /dev/null || { exit 1 } +# XXX: Migration from master branch to main +branch=$(git rev-parse --abbrev-ref HEAD) +changes=$(git status --porcelain | grep -v "^??") +if [ "$branch" == "master" ]; then + echo "! WARNING !" + echo "We are changing our default branch to 'main' and we have detected" + echo "you are still using 'master'." + echo + + if [ -n "$changes" ]; then + echo "! Manual action required !" + echo "There are uncommited changes in your staging area. Please sort this" + echo "out and then manually checkout the 'main' branch using 'git checkout main'." + exit 1 + fi + + git checkout main + echo "Automatically switched to 'main' branch." +fi + echo 'Updating poezio' git pull --ff-only origin master || { echo "The script failed to update poezio." -- cgit v1.2.3