Skip to content

Commit

Permalink
Fix Create Changelog Action
Browse files Browse the repository at this point in the history
  • Loading branch information
afshin committed Aug 18, 2021
1 parent 3127bd9 commit 625b969
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
17 changes: 17 additions & 0 deletions jupyter_releaser/actions/draft_changelog.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import os

from jupyter_releaser.util import CHECKOUT_NAME
from jupyter_releaser.util import get_latest_tag
from jupyter_releaser.util import log
from jupyter_releaser.util import run

run("jupyter-releaser prep-git")

# Capture the "since" argument in case we add tags befor checking changelog
# Do this before bumping the version
if not os.environ.get("RH_SINCE"):
curr_dir = os.getcwd()
os.chdir(CHECKOUT_NAME)
since = get_latest_tag(os.environ["RH_BRANCH"]) or ""
if since:
log(f"Capturing {since} in RH_SINCE variable")
os.environ["RH_SINCE"] = since
os.chdir(curr_dir)

run("jupyter-releaser bump-version")
run("jupyter-releaser build-changelog")
run("jupyter-releaser draft-changelog")
3 changes: 1 addition & 2 deletions jupyter_releaser/actions/draft_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@

run("jupyter-releaser prep-git")

# Capture the "since" argument in case we add tags before the second
# "Check Changelog"
# Capture the "since" argument in case we add tags befor checking changelog
# Do this before bumping the version
if not os.environ.get("RH_SINCE"):
curr_dir = os.getcwd()
Expand Down

0 comments on commit 625b969

Please sign in to comment.