Skip to content
Open
Show file tree
Hide file tree
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
18 changes: 15 additions & 3 deletions scripts/apache_release_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,9 @@ def create_release_artifacts(package_config: dict, version, no_sign: bool = Fals
wheel_signed_files = sign_artifacts(wheel_file)

files_to_upload = [new_tar_ball, *new_tar_ball_signed, wheel_file, *wheel_signed_files]
return files_to_upload
# Return absolute paths: the caller (svn_upload) runs from the repo root,
# but these paths are relative to the package working_dir we chdir'd into.
return [os.path.abspath(f) for f in files_to_upload]

finally:
# Always return to original directory
Expand All @@ -474,10 +476,13 @@ def svn_upload(package_name: str, version, rc_num, files_to_import: list[str], a

try:
# Create a new directory for the release candidate.
# Tolerate an already-existing directory (e.g. re-running after a
# partial upload): mkdir failing because the path exists is not fatal,
# we still want to import the files below.
print(
f"Creating directory for {package_name} {version}-incubating-RC{rc_num}... at {svn_path}"
)
subprocess.run(
mkdir_result = subprocess.run(
[
"svn",
"mkdir",
Expand All @@ -486,8 +491,15 @@ def svn_upload(package_name: str, version, rc_num, files_to_import: list[str], a
f"Creating directory for {package_name} {version}-incubating-RC{rc_num}",
svn_path,
],
check=True,
capture_output=True,
text=True,
)
if mkdir_result.returncode != 0:
if "already exists" in (mkdir_result.stderr or ""):
print(f"Directory already exists at {svn_path}, continuing to import files.")
else:
print(f"Error creating SVN directory: {mkdir_result.stderr.strip()}")
return None

# Use svn import for the new directory.
for file_path in files_to_import:
Expand Down
4 changes: 4 additions & 0 deletions scripts/verify-sub-packages/verify_contrib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ if [ -z "$ARTIFACTS_DIR" ]; then
svn export -q "https://dist.apache.org/repos/dist/dev/incubator/hamilton/${PACKAGE}/${VERSION}-RC${RC}/" "$ARTIFACTS_DIR"
fi

# Resolve to an absolute path: later steps cd into /tmp, which would break
# a relative artifacts dir.
ARTIFACTS_DIR="$(cd "$ARTIFACTS_DIR" && pwd)"

echo "Artifacts: $ARTIFACTS_DIR"
ls "$ARTIFACTS_DIR"/*.tar.gz "$ARTIFACTS_DIR"/*.whl 2>/dev/null || { echo "ERROR: No artifacts found"; exit 1; }

Expand Down
4 changes: 4 additions & 0 deletions scripts/verify-sub-packages/verify_lsp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ if [ -z "$ARTIFACTS_DIR" ]; then
svn export -q "https://dist.apache.org/repos/dist/dev/incubator/hamilton/${PACKAGE}/${VERSION}-RC${RC}/" "$ARTIFACTS_DIR"
fi

# Resolve to an absolute path: later steps cd into /tmp, which would break
# a relative artifacts dir.
ARTIFACTS_DIR="$(cd "$ARTIFACTS_DIR" && pwd)"

echo "Artifacts: $ARTIFACTS_DIR"
ls "$ARTIFACTS_DIR"/*.tar.gz "$ARTIFACTS_DIR"/*.whl 2>/dev/null || { echo "ERROR: No artifacts found"; exit 1; }

Expand Down
4 changes: 4 additions & 0 deletions scripts/verify-sub-packages/verify_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ if [ -z "$ARTIFACTS_DIR" ]; then
svn export -q "https://dist.apache.org/repos/dist/dev/incubator/hamilton/${PACKAGE}/${VERSION}-RC${RC}/" "$ARTIFACTS_DIR"
fi

# Resolve to an absolute path: later steps cd into /tmp, which would break
# a relative artifacts dir.
ARTIFACTS_DIR="$(cd "$ARTIFACTS_DIR" && pwd)"

echo "Artifacts: $ARTIFACTS_DIR"
ls "$ARTIFACTS_DIR"/*.tar.gz "$ARTIFACTS_DIR"/*.whl 2>/dev/null || { echo "ERROR: No artifacts found"; exit 1; }

Expand Down
4 changes: 4 additions & 0 deletions scripts/verify-sub-packages/verify_ui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ if [ -z "$ARTIFACTS_DIR" ]; then
svn export -q "https://dist.apache.org/repos/dist/dev/incubator/hamilton/${PACKAGE}/${VERSION}-RC${RC}/" "$ARTIFACTS_DIR"
fi

# Resolve to an absolute path: later steps cd into /tmp, which would break
# a relative artifacts dir.
ARTIFACTS_DIR="$(cd "$ARTIFACTS_DIR" && pwd)"

echo "Artifacts: $ARTIFACTS_DIR"
ls "$ARTIFACTS_DIR"/*.tar.gz "$ARTIFACTS_DIR"/*.whl 2>/dev/null || { echo "ERROR: No artifacts found"; exit 1; }

Expand Down