Skip to content
Merged
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
8 changes: 5 additions & 3 deletions jupyter_releaser/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,11 +598,13 @@ def ensure_sha():
"""Ensure the sha of the remote branch matches the expected sha"""
current_sha = os.environ["RH_CURRENT_SHA"]
branch = os.environ["RH_BRANCH"]
log("Ensuring sha...")
remote_name = get_remote_name(False)
run(f"git fetch {remote_name} {branch}")
sha = run(f"git rev-parse {remote_name}/{branch}")
run("git remote -v", echo=True)
run(f"git fetch {remote_name} {branch}", echo=True)
sha = run(f"git rev-parse {remote_name}/{branch}", echo=True)
if sha != current_sha:
raise ValueError(f"{branch} is ahead of expected sha {current_sha}")
raise ValueError(f"{branch} current sha {sha} is not equal to expected sha {current_sha}")


def get_gh_object(dry_run=False, **kwargs):
Expand Down