Skip to content

Commit f8d4d55

Browse files
authored
Release script corrections
1 parent 37845c8 commit f8d4d55

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

docs/developer/release/release_build.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
delete_directory_if_exists,
2323
delete_if_exists,
2424
ensure_group_access,
25+
ensure_user_access,
2526
has_command_line_option,
2627
increment_version,
2728
print_step,
@@ -216,7 +217,9 @@ def build_checker_framework_release(
216217

217218
dev_website_relative_dir = Path(DEV_SITE_DIR) / "releases" / version
218219
print(f"Copying from: {dev_website_relative_dir}\n to: {DEV_SITE_DIR}")
219-
shutil.copytree(str(dev_website_relative_dir), str(DEV_SITE_DIR))
220+
ensure_group_access(dev_website_relative_dir)
221+
ensure_user_access(dev_website_relative_dir)
222+
shutil.copytree(str(dev_website_relative_dir), str(DEV_SITE_DIR), dirs_exist_ok=True)
220223

221224

222225
def commit_to_interm_projects(cf_version: str) -> None:

docs/developer/release/release_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,9 @@ def update_repo(path: Path, bareflag: bool) -> None:
289289

290290
def commit_tag_and_push(version: str, path: Path, tag_prefix: str) -> None:
291291
"""Commit the changes made for this release, add a tag, and push these changes."""
292+
# Remove the pre-commit hook because it can cause errors.
293+
execute("rm -f .git/hooks/pre-commit", working_dir=path)
294+
292295
# Do nothing (instead of erring) if there is nothing to commit.
293296
if execute_status("git diff-index --quiet HEAD", working_dir=path) != 0:
294297
execute(f'git commit -a -m "new release {version}"', working_dir=path)

0 commit comments

Comments
 (0)