Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore capture of since parameter #118

Merged
merged 1 commit into from
Aug 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
13 changes: 13 additions & 0 deletions jupyter_releaser/actions/draft_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from jupyter_releaser.changelog import extract_current
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

Expand All @@ -31,6 +32,18 @@
run("pip install -q -e .")

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")

if check_release:
Expand Down