This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 7958531986 Update release.py
7958531986 is described below
commit 795853198627b9d9f14109fffbb83dec74a8e707
Author: James Bognar <[email protected]>
AuthorDate: Tue Dec 30 13:31:13 2025 -0500
Update release.py
---
scripts/release.py | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
diff --git a/scripts/release.py b/scripts/release.py
index ccf6abeaf9..20cd6749c9 100755
--- a/scripts/release.py
+++ b/scripts/release.py
@@ -599,11 +599,15 @@ class ReleaseScript:
self.start_timer()
staging = Path(os.environ.get('X_STAGING',
'~/tmp/dist-release-juneau')).expanduser()
+
+ # Clean up entire staging directory to start fresh (avoids issues from
previous runs)
+ if staging.exists():
+ print(f" Removing existing staging directory: {staging}")
+ shutil.rmtree(staging)
+
staging.mkdir(parents=True, exist_ok=True)
git_dir = staging / 'git'
- if git_dir.exists():
- shutil.rmtree(git_dir)
git_dir.mkdir(parents=True)
self.end_timer()
@@ -618,13 +622,11 @@ class ReleaseScript:
git_dir = staging / 'git'
juneau_dir = git_dir / 'juneau'
- if juneau_dir.exists():
- print(f"Repository already exists at {juneau_dir}, skipping clone")
- else:
- self.run_command(
- ['git', 'clone',
'https://gitbox.apache.org/repos/asf/juneau.git'],
- cwd=git_dir
- )
+ # Since we clean up the staging directory in make_git_folder, this
should always be a fresh clone
+ self.run_command(
+ ['git', 'clone', 'https://gitbox.apache.org/repos/asf/juneau.git'],
+ cwd=git_dir
+ )
self.end_timer()
self.state.set_last_step('clone_juneau')