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

Misc. refactoring and enhancements to create_point_release #25

Merged
merged 22 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f4f9693
Verify that galaxy-root contains galaxy files
jdavcs Dec 9, 2024
29d282a
Make new-version option required
jdavcs Dec 9, 2024
d022e38
Make last-commit option required
jdavcs Dec 12, 2024
cce6392
Restore galaxy root to base branch on error
jdavcs Dec 9, 2024
81a2fef
Factor out local helper functions, wrap in try/finally
jdavcs Dec 10, 2024
e4cb5dd
Checkout original branch in finally clause only when needed
jdavcs Dec 11, 2024
3cf144c
Factor out constructing path to version.py
jdavcs Dec 11, 2024
c13d944
Rename, restructure, simplify
jdavcs Dec 12, 2024
4dac257
More refactoring
jdavcs Dec 12, 2024
85f8b0f
Factor out update-packages function
jdavcs Dec 13, 2024
208e568
Factor out show-modified-paths-and-diff
jdavcs Dec 13, 2024
6fad7c3
Factor out run-upload-packages
jdavcs Dec 13, 2024
43e110f
Factor out stage-changes-commit-and-tag
jdavcs Dec 13, 2024
66485cb
Move build-packages out of update-packages into its own function
jdavcs Dec 13, 2024
1ea746b
Decouple updating Package history and writing it to a file
jdavcs Dec 13, 2024
8efae66
Do not check for new_version: it's never None
jdavcs Dec 13, 2024
0d53292
Refactor update-packages to handle both cases and remove duplication
jdavcs Dec 13, 2024
925f676
Factor out state-changes-and-commit
jdavcs Dec 13, 2024
01084c7
Factor out merge-changes-into-newer-branches
jdavcs Dec 13, 2024
f86a9d7
Factor out run-push-references
jdavcs Dec 13, 2024
c42705e
Add types, minor cleanup
jdavcs Dec 13, 2024
fffe0a8
Simplify push-references
jdavcs Dec 13, 2024
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
5 changes: 4 additions & 1 deletion galaxy_release_util/bootstrap_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
PROJECT_URL,
strip_release,
)
from .util import verify_galaxy_root

OLDER_RELEASES_FILENAME = "older_releases.rst"

Expand Down Expand Up @@ -388,6 +389,7 @@ def create_release_issue(
release_date: datetime.date,
dry_run: bool,
):
verify_galaxy_root(galaxy_root)
previous_version = _get_previous_release_version(galaxy_root, release_version)
next_version = next_version or _get_next_release_version(release_version)
assert next_version > release_version, "Next release version should be greater than release version"
Expand Down Expand Up @@ -457,6 +459,7 @@ def create_next_release_announcement_file() -> None:
filename = _release_file(galaxy_root, f"{next_version}_announce.rst")
_write_file(filename, content, skip_if_exists=True)

verify_galaxy_root(galaxy_root)
next_version = next_version or _get_next_release_version(release_version)
create_release_file()
create_announcement_file()
Expand Down Expand Up @@ -645,7 +648,7 @@ def _get_release_documentation_filenames(galaxy_root: Path) -> List[str]:
"""Return contents of release documentation directory."""
releases_path = galaxy_root / "doc" / "source" / "releases"
if not os.path.exists(releases_path):
msg = f"Path to releases documentation not found: {releases_path}. If you are running this script outside of galaxy root directory, you should specify the '--galaxy-root' argument"
msg = f"Path to releases documentation not found: {releases_path}"
raise Exception(msg)
return sorted(os.listdir(releases_path))

Expand Down
Loading
Loading