Skip to content

Commit c98bca1

Browse files
authored
Merge pull request #323 from NearNodeFlash:fix/setup-release-env-pipestatus-and-submodules
Fix nnf_cmd exit code and update submodule pointers
2 parents b8fe628 + a788abd commit c98bca1

7 files changed

Lines changed: 11 additions & 7 deletions

File tree

.github/agents/release.agent.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Before starting any release work, read these files completely:
1818
## Core Rules
1919

2020
- **ALWAYS wait for explicit user approval before proceeding to the next step.** After every step, state what you did, whether it succeeded, and the evidence. **WAIT for the user.**
21+
- **ONE command per turn.** Run the command for ONE repo, show the full output, state PASS or FAIL with evidence, then STOP. Do not run the next repo's command until the user explicitly says to proceed. This applies even when the plan shows a `for` loop — execute the loop body manually, one repo per turn.
2122
- **ALWAYS run commands in a terminal** so the user can see them.
2223
- **ALWAYS append `2>&1 | cat`** to every `release-all.sh` and `gh` command — no exceptions.
2324
- **ONE repo at a time.** Execute one phase per repo sequentially. **NEVER parallelize** across repos.

nnf-dm

Submodule nnf-dm updated 135 files

nnf-integration-test

tools/release-all/RELEASE-PLAN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ Source the release environment helper to auto-compute versions, detect the relea
102102
source ./setup-release-env.sh -B patch # or -B minor / -B major
103103
```
104104

105+
> **Important:** Never pipe this `source` command (e.g. `source ... | cat`). Piping runs `source` in a subshell, which means the exported variables and function definitions (`nnf_cmd`, etc.) are lost to the calling shell. If you need to capture output, redirect to a file or run without the pipe.
106+
105107
This exports `$PREVIOUS_RELEASE`, `$NNF_RELEASE`, `$RELEASE_TYPE`, and `$RELEASE_REVIEWERS`, and defines helper functions `nnf_cmd`, `nnf_create_pr`, `nnf_add_reviewers`, and `nnf_gh_repo`. Confirm the printed summary with the user before proceeding.
106108

107109
List repos:
@@ -270,8 +272,6 @@ The `-i` flag displays image version changes inline. Use `-d` to display the ful
270272

271273
Check each repo for correct tag, release notes, and artifacts (`manifests.tar` + `manifests-kind.tar` on `nnf-deploy`).
272274

273-
274-
275275
---
276276

277277
### Relevant files

tools/release-all/setup-release-env.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,12 @@ fi
7878
# Usage: nnf_cmd <phase> <repo>
7979
nnf_cmd() {
8080
local phase="$1" repo="$2"
81-
local args=()
81+
local args=() _rc
8282
[[ "$repo" == "nnf_sos" ]] && args+=("-M")
8383
./release-all.sh -B "$RELEASE_TYPE" -P "$phase" -R "$repo" "${args[@]}" 2>&1 | cat
84+
# bash uses PIPESTATUS[0]; zsh uses pipestatus[1] (lowercase, 1-indexed)
85+
_rc=${PIPESTATUS[0]:-${pipestatus[1]}}
86+
return "${_rc:-0}"
8487
}
8588

8689
# --- Helper: create-pr + capture PR number -----------------------------------

0 commit comments

Comments
 (0)