Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .kokoro/release.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

build_file: "github/data-manager-node/.kokoro/release.sh"

# Default to DRY_RUN=true for safety; can be overridden via Stubby/Kokoro API
# Default to DRY_RUN=true for safety; can be overridden via API or UI
env_vars: {
key: "DRY_RUN"
value: "true"
Expand Down
11 changes: 9 additions & 2 deletions .kokoro/release.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
#!/bin/bash
set -euo pipefail

# Default to dry-run for safety unless DRY_RUN=false is explicitly passed.
DRY_RUN="${DRY_RUN:-true}"
if [[ "${DRY_RUN}" != "true" && "${DRY_RUN}" != "false" ]]; then
echo "ERROR: DRY_RUN must be 'true' or 'false' (got '${DRY_RUN}')." >&2
exit 1
fi

# -----------------------------------------------------------------------------
# 1. Workspace & Directory Resolution
# -----------------------------------------------------------------------------
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${REPO_DIR}"

echo "=== Building and Releasing from: ${REPO_DIR} ==="
echo "=== Building and Releasing from: ${REPO_DIR} (DRY_RUN=${DRY_RUN}) ==="

# -----------------------------------------------------------------------------
# 2. Environment & Tooling Setup
Expand Down Expand Up @@ -79,7 +86,7 @@ npx google-artifactregistry-auth

# If DRY_RUN is set to "true", stop here so you can verify the process without
# consuming the version and without publishing to public npm.
if [[ "${DRY_RUN:-false}" == "true" ]]; then
if [[ "${DRY_RUN}" == "true" ]]; then
echo "=== DRY_RUN is enabled. Skipping Artifact Registry and manifest upload."
echo "=== Uploading to Artifact Registry would claim the current version, "
echo "=== preventing us from actually releasing it via DRY_RUN=false. "
Expand Down
Loading