Skip to content

Commit

Permalink
Merge pull request #1085 from jtpio/bump-stable-tag
Browse files Browse the repository at this point in the history
Add script to automatically reset the `stable` branch on release
  • Loading branch information
trungleduc authored Feb 1, 2022
2 parents ab99816 + 01ebcf4 commit 15ccacf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ skip = ["check-links"]
before-bump-version = ["python -m pip install bump2version jupyterlab~=3.0"]
before-build-npm = ["python -m pip install jupyterlab~=3.0", "jlpm clean", "jlpm build:prod"]
before-build-python = ["jlpm clean"]
after-draft-release = "bash ./scripts/reset-stable.sh"

[tool.jupyter-releaser.options]
version-cmd = "python scripts/bump-version.py --force"
Expand Down
9 changes: 9 additions & 0 deletions scripts/reset-stable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set -eux

git checkout stable || git checkout -b stable
git reset --hard origin/main

# Update the stable branch to point the latest release
if [[ ${RH_DRY_RUN:=true} != 'true' ]]; then
git push origin stable -f
fi

0 comments on commit 15ccacf

Please sign in to comment.