Skip to content

Commit f9f69b1

Browse files
committed
Fix handling of "since" parameter
Fixes capture of `RH_SINCE` that was disrupted by #106
1 parent d0cc8fb commit f9f69b1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

jupyter_releaser/actions/draft_release.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,14 @@
3636
# Capture the "since" argument in case we add tags before the second
3737
# "Check Changelog"
3838
# Do this before bumping the version
39-
curr_dir = os.getcwd()
40-
os.chdir(CHECKOUT_NAME)
41-
os.environ.setdefault("RH_SINCE", get_latest_tag(os.environ["RH_BRANCH"]) or "")
42-
os.chdir(curr_dir)
39+
if not os.environ.get("RH_SINCE"):
40+
curr_dir = os.getcwd()
41+
os.chdir(CHECKOUT_NAME)
42+
since = get_latest_tag(os.environ["RH_BRANCH"]) or ""
43+
if since:
44+
log(f"Capturing {since} in RH_SINCE variable")
45+
os.environ["RH_SINCE"] = since
46+
os.chdir(curr_dir)
4347

4448
run("jupyter-releaser bump-version")
4549

0 commit comments

Comments
 (0)