Migrate to 'main' branch
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
48373be751
commit
4b01469a62
3 changed files with 24 additions and 2 deletions
|
@ -7,6 +7,7 @@ build-doc:
|
||||||
stage: build
|
stage: build
|
||||||
only:
|
only:
|
||||||
- master@poezio/poezio
|
- master@poezio/poezio
|
||||||
|
- main@poezio/poezio
|
||||||
tags:
|
tags:
|
||||||
- www
|
- www
|
||||||
image: python:3
|
image: python:3
|
||||||
|
@ -30,6 +31,7 @@ build-ubuntu:
|
||||||
- dist/
|
- dist/
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
- main
|
||||||
|
|
||||||
security-check:
|
security-check:
|
||||||
stage: lint
|
stage: lint
|
||||||
|
|
|
@ -38,8 +38,8 @@ useless merges (and polluting the commit history) when none is needed.
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
git fetch origin
|
git fetch origin
|
||||||
git rebase origin/master
|
git rebase origin/main
|
||||||
git push origin master
|
git push origin main
|
||||||
|
|
||||||
If your commit is related to an issue on our tracker_ (or fixes such an
|
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
|
issue), you can use ``Fix #BUGID`` or ``References #BUGID`` to help with the
|
||||||
|
|
20
update.sh
20
update.sh
|
@ -27,6 +27,26 @@ $POEZIO_PYTHON -c 'import venv' &> /dev/null || {
|
||||||
exit 1
|
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'
|
echo 'Updating poezio'
|
||||||
git pull --ff-only origin master || {
|
git pull --ff-only origin master || {
|
||||||
echo "The script failed to update poezio."
|
echo "The script failed to update poezio."
|
||||||
|
|
Loading…
Reference in a new issue