pingtimeout commented on code in PR #2156:
URL: https://github.com/apache/polaris/pull/2156#discussion_r2257126071


##########
releasey/05-build-and-stage-distributions.sh:
##########
@@ -0,0 +1,155 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# Build and Stage Distributions Script
+#
+# Builds source and binary distributions and stages them to the Apache dist 
dev repository.
+# This script automates the "Build and stage the distributions" step from the 
release guide.
+#
+
+set -euo pipefail
+
+releasey_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+LIBS_DIR="${releasey_dir}/libs"
+
+source "${LIBS_DIR}/_log.sh"
+source "${LIBS_DIR}/_constants.sh"
+source "${LIBS_DIR}/_exec.sh"
+source "${LIBS_DIR}/_version.sh"
+source "${LIBS_DIR}/_gpg.sh"
+
+function usage() {
+  cat << EOF
+$(basename "$0") [--help | -h]
+
+  Builds source and binary distributions and stages them to the Apache dist 
dev repository.
+  The version is automatically determined from the current git tag.  I.e. this 
script must
+  be run from a release candidate tag.
+
+  Options:
+    -h --help
+        Print usage information.
+
+  Examples:
+    $(basename "$0")
+
+EOF
+}
+
+while [[ $# -gt 0 ]]; do
+  case $1 in
+    --help|-h)
+      usage
+      exit 0
+      ;;
+    *)
+      print_error "Unknown option/argument $1"
+      usage >&2
+      exit 1
+      ;;
+  esac
+done
+
+# Determine version from current git tag
+print_info "Determining version from current git tag..."
+
+if ! git_tag=$(git describe --tags --exact-match HEAD 2>/dev/null); then
+  print_error "Current HEAD is not on a release candidate tag. Please checkout 
a release candidate tag first."
+  print_error "Use: git checkout apache-polaris-x.y.z-incubating-rcN"
+  exit 1
+fi
+print_info "Found git tag: ${git_tag}"
+
+# Validate git tag format and extract version components
+if ! validate_and_extract_git_tag_version "${git_tag}"; then
+  print_error "Invalid git tag format: ${git_tag}"
+  print_error "Expected format: apache-polaris-x.y.z-incubating-rcN"
+  exit 1
+fi
+
+polaris_version="${major}.${minor}.${patch}-incubating"
+
+print_info "Starting build and stage distributions process..."
+print_info "Version: ${polaris_version}"
+print_info "RC number: ${rc_number}"
+echo
+
+# Build distributions
+print_info "Building source and binary distributions..."
+exec_process cd "${releasey_dir}/.."
+exec_process ./gradlew build sourceTarball -Prelease -PuseGpgAgent -x test -x 
intTest
+
+# Create Helm package
+print_info "Creating Helm package..."
+exec_process cd "${releasey_dir}/../helm"
+exec_process helm package polaris
+exec_process helm gpg sign polaris-${polaris_version}.tgz

Review Comment:
   Correct



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to