From 49f49e3a963d557bf58c70a2029052bc97fcd5a4 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Sun, 15 Mar 2026 20:05:33 -0500 Subject: [PATCH] docs: add explicit cross-step references in gstack-upgrade template Bash blocks are self-contained, but cross-block variable references (INSTALL_DIR from Step 2) were implicit. Adds prose making them explicit. Co-Authored-By: Claude Opus 4.6 (1M context) --- gstack-upgrade/SKILL.md | 8 +++++++- gstack-upgrade/SKILL.md.tmpl | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gstack-upgrade/SKILL.md b/gstack-upgrade/SKILL.md index 1cf7d548..42f13f69 100644 --- a/gstack-upgrade/SKILL.md +++ b/gstack-upgrade/SKILL.md @@ -94,14 +94,20 @@ fi echo "Install type: $INSTALL_TYPE at $INSTALL_DIR" ``` +The install type and directory path printed above will be used in all subsequent steps. + ### Step 3: Save old version +Use the install directory from Step 2's output below: + ```bash OLD_VERSION=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown") ``` ### Step 4: Upgrade +Use the install type and directory detected in Step 2: + **For git installs** (global-git, local-git): ```bash cd "$INSTALL_DIR" @@ -125,7 +131,7 @@ rm -rf "$INSTALL_DIR.bak" "$TMP_DIR" ### Step 4.5: Sync local vendored copy -After upgrading the primary install, check if there's also a local copy in the current project that needs updating: +Use the install directory from Step 2. Check if there's also a local vendored copy that needs updating: ```bash _ROOT=$(git rev-parse --show-toplevel 2>/dev/null) diff --git a/gstack-upgrade/SKILL.md.tmpl b/gstack-upgrade/SKILL.md.tmpl index 4a124be1..a199db6c 100644 --- a/gstack-upgrade/SKILL.md.tmpl +++ b/gstack-upgrade/SKILL.md.tmpl @@ -92,14 +92,20 @@ fi echo "Install type: $INSTALL_TYPE at $INSTALL_DIR" ``` +The install type and directory path printed above will be used in all subsequent steps. + ### Step 3: Save old version +Use the install directory from Step 2's output below: + ```bash OLD_VERSION=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown") ``` ### Step 4: Upgrade +Use the install type and directory detected in Step 2: + **For git installs** (global-git, local-git): ```bash cd "$INSTALL_DIR" @@ -123,7 +129,7 @@ rm -rf "$INSTALL_DIR.bak" "$TMP_DIR" ### Step 4.5: Sync local vendored copy -After upgrading the primary install, check if there's also a local copy in the current project that needs updating: +Use the install directory from Step 2. Check if there's also a local vendored copy that needs updating: ```bash _ROOT=$(git rev-parse --show-toplevel 2>/dev/null)