summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2020-09-08 15:51:30 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2020-09-10 10:05:55 +0200
commit4b01469a62bc753af9d256d63e81244d424af003 (patch)
tree37453161c6a3491a4f2db27f2509ba815db95b91
parent48373be7514b7d5e61d51ab458c35503ddf57b64 (diff)
downloadpoezio-4b01469a62bc753af9d256d63e81244d424af003.tar.gz
poezio-4b01469a62bc753af9d256d63e81244d424af003.tar.bz2
poezio-4b01469a62bc753af9d256d63e81244d424af003.tar.xz
poezio-4b01469a62bc753af9d256d63e81244d424af003.zip
Migrate to 'main' branch
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--doc/source/dev/contributing.rst4
-rwxr-xr-xupdate.sh20
3 files changed, 24 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f9b2b9d8..6207c8a2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -7,6 +7,7 @@ build-doc:
stage: build
only:
- master@poezio/poezio
+ - main@poezio/poezio
tags:
- www
image: python:3
@@ -30,6 +31,7 @@ build-ubuntu:
- dist/
only:
- master
+ - main
security-check:
stage: lint
diff --git a/doc/source/dev/contributing.rst b/doc/source/dev/contributing.rst
index 8d386c87..79737b25 100644
--- a/doc/source/dev/contributing.rst
+++ b/doc/source/dev/contributing.rst
@@ -38,8 +38,8 @@ useless merges (and polluting the commit history) when none is needed.
.. code-block:: bash
git fetch origin
- git rebase origin/master
- git push origin master
+ git rebase origin/main
+ git push origin main
If your commit is related to an issue on our tracker_ (or fixes such an
issue), you can use ``Fix #BUGID`` or ``References #BUGID`` to help with the
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."