Skip to content

Commit 15ccacf

Browse files
authored
Merge pull request #1085 from jtpio/bump-stable-tag
Add script to automatically reset the `stable` branch on release
2 parents ab99816 + 01ebcf4 commit 15ccacf

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ skip = ["check-links"]
2323
before-bump-version = ["python -m pip install bump2version jupyterlab~=3.0"]
2424
before-build-npm = ["python -m pip install jupyterlab~=3.0", "jlpm clean", "jlpm build:prod"]
2525
before-build-python = ["jlpm clean"]
26+
after-draft-release = "bash ./scripts/reset-stable.sh"
2627

2728
[tool.jupyter-releaser.options]
2829
version-cmd = "python scripts/bump-version.py --force"

scripts/reset-stable.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
set -eux
2+
3+
git checkout stable || git checkout -b stable
4+
git reset --hard origin/main
5+
6+
# Update the stable branch to point the latest release
7+
if [[ ${RH_DRY_RUN:=true} != 'true' ]]; then
8+
git push origin stable -f
9+
fi

0 commit comments

Comments
 (0)