From 91be91fd6c38ef4a7f5aea5bd142bf9938cc4916 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 6 Oct 2022 16:19:42 -0500 Subject: [PATCH 1/2] fix ensure_sha and doc links --- README.md | 1 - jupyter_releaser/actions/populate_release.py | 9 +++++---- jupyter_releaser/util.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f182f321..3a352d63 100644 --- a/README.md +++ b/README.md @@ -31,4 +31,3 @@ See the [action details documentation](https://jupyter-releaser.readthedocs.io/e The actions can be run on a [fork](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_releaser.html#) of `jupyter_releaser` and target multiple repositories, or run as workflows on the [source repositories](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo), using -shared credentials. diff --git a/jupyter_releaser/actions/populate_release.py b/jupyter_releaser/actions/populate_release.py index 5d094b34..1609075e 100644 --- a/jupyter_releaser/actions/populate_release.py +++ b/jupyter_releaser/actions/populate_release.py @@ -29,14 +29,15 @@ dry_run = os.environ.get("RH_DRY_RUN", "").lower() == "true" -if not dry_run: - # Ensure the branch sha has not changed. - ensure_sha() - if not os.environ.get("RH_RELEASE_URL"): raise RuntimeError("Cannot complete Draft Release, no draft GitHub release url found!") run_action("jupyter-releaser prep-git") + +if not dry_run: + # Ensure the branch sha has not changed. + ensure_sha() + run_action("jupyter-releaser bump-version") run_action("jupyter-releaser extract-changelog") diff --git a/jupyter_releaser/util.py b/jupyter_releaser/util.py index faf919f1..95be3928 100644 --- a/jupyter_releaser/util.py +++ b/jupyter_releaser/util.py @@ -604,7 +604,7 @@ def ensure_sha(): run(f"git fetch {remote_name} {branch}", echo=True) sha = run(f"git rev-parse {remote_name}/{branch}", echo=True) if sha != current_sha: - log(f"{branch} current sha {sha} is not equal to expected sha {current_sha}") + raise RuntimeError(f"{branch} current sha {sha} is not equal to expected sha {current_sha}") def get_gh_object(dry_run=False, **kwargs): From 8d6c740429ac922afb948a575b406a13ce2a863e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Thu, 6 Oct 2022 16:22:16 -0500 Subject: [PATCH 2/2] docs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a352d63..30a4b91e 100644 --- a/README.md +++ b/README.md @@ -30,4 +30,4 @@ GitHub actions scripts are available to draft a changelog, draft a release, publ See the [action details documentation](https://jupyter-releaser.readthedocs.io/en/latest/background/theory.html#action-details) for more information. The actions can be run on a [fork](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_releaser.html#) of `jupyter_releaser` and target multiple -repositories, or run as workflows on the [source repositories](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo), using +repositories, or run as workflows on the [source repositories](https://jupyter-releaser.readthedocs.io/en/latest/how_to_guides/convert_repo_from_repo), using shared credentials.