From ab7313584a3e80b96fdf72f892cdbf04083adcad Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 11 Mar 2026 10:49:19 -0500 Subject: [PATCH 1/2] update-version.sh: update usage docs, other small changes --- ci/release/update-version.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 67f3763..43db8ac 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -3,10 +3,15 @@ # SPDX-License-Identifier: Apache-2.0 ## Usage -# bash update-version.sh +# NOTE: This script must be run from the repository root, not from the ci/release/ directory +# Primary interface: bash ci/release/update-version.sh [--run-context=main|release] +# Fallback interface: [RAPIDS_RUN_CONTEXT=main|release] bash ci/release/update-version.sh +# CLI arguments take precedence over environment variables set -euo pipefail +set -x + # Parse command line arguments CLI_RUN_CONTEXT="" VERSION_ARG="" @@ -29,10 +34,10 @@ done NEXT_FULL_TAG="$VERSION_ARG" # Determine RUN_CONTEXT with CLI precedence over environment variable, defaulting to main -if [[ -n "$CLI_RUN_CONTEXT" ]]; then +if [[ -n "${CLI_RUN_CONTEXT:-}" ]]; then RUN_CONTEXT="$CLI_RUN_CONTEXT" echo "Using run-context from CLI: $RUN_CONTEXT" -elif [[ -n "${RAPIDS_RUN_CONTEXT}" ]]; then +elif [[ -n "${RAPIDS_RUN_CONTEXT:-}" ]]; then RUN_CONTEXT="$RAPIDS_RUN_CONTEXT" echo "Using run-context from environment: $RUN_CONTEXT" else @@ -48,7 +53,7 @@ if [[ "${RUN_CONTEXT}" != "main" && "${RUN_CONTEXT}" != "release" ]]; then fi # Validate version argument -if [[ -z "$NEXT_FULL_TAG" ]]; then +if [[ -z "${NEXT_FULL_TAG:-}" ]]; then echo "Error: Version argument is required" echo "Usage: $0 [--run-context=]" echo " or: [RAPIDS_RUN_CONTEXT=] $0 " From 72a755914997d0c80b5bb04802fbd24a7f795242 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 11 Mar 2026 10:54:39 -0500 Subject: [PATCH 2/2] remove debugging line, update shellcheck --- .pre-commit-config.yaml | 2 +- ci/release/update-version.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0f1bd6..5a88d6e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -118,7 +118,7 @@ repos: - id: rapids-dependency-file-generator args: ["--clean", "--warn-all", "--strict"] - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 + rev: v0.11.0.1 hooks: - id: shellcheck args: ["--severity=warning"] diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 43db8ac..6e177e8 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -10,8 +10,6 @@ set -euo pipefail -set -x - # Parse command line arguments CLI_RUN_CONTEXT="" VERSION_ARG=""