--- description: Bump the recipe version and publish the release via `abra recipe release` argument-hint: [--patch|--minor|--major] allowed-tools: [Bash, Read, Grep] --- # Recipe New Tag Bump the recipe version label and publish the release using **`abra recipe release`** — the one command that bumps the `coop-cloud.${STACK_NAME}.version` label, commits, creates the annotated tag, **and pushes the tag upstream** (which publishes the release to the Co-op Cloud catalogue). Do **not** hand-compute the semver or hand-edit the label — let abra do it. > ⚠️ **This publishes.** A real (non-`--dry-run`) `abra recipe release` pushes the tag to the recipe's git > origin, generating a catalogue release. Only run it from a machine that has push access to the recipe's > upstream (ssh-agent loaded with the coopcloud key), and only when you mean to publish. In the > upgrade-PR flow this is the **final** step, run after the upstream PR merges (see `/recipe-upstream`). The arguments are: $ARGUMENTS Parse the arguments to extract the recipe name (first positional arg) and the bump type flag (`--patch`, `--minor`, or `--major`). Default to `--patch` if no flag is given. ## Steps 1. **Check for uncommitted changes** in the recipe directory: ```bash git -C ~/.abra/recipes/ status --short ``` If there are uncommitted changes, review the diff to understand what changed: ```bash git -C ~/.abra/recipes/ diff git -C ~/.abra/recipes/ diff --cached git -C ~/.abra/recipes/ ls-files --others --exclude-standard ``` Then stage everything and create a commit with a concise message summarising the changes (not just "update files" — describe what actually changed, e.g. "move WOPI startup trigger to celery worker" or "add celery-beat service for WOPI scheduling"): ```bash cd ~/.abra/recipes/ git add -A git commit -m "" ``` If there are no uncommitted changes, skip this step. 2. **Run `abra recipe release`** with the parsed recipe name and the flag for the bump type. Map the bump type to the abra flag (`major→-x`, `minor→-y`, `patch→-z`), then run the real (non-`--dry-run`) command — it bumps the label, commits, tags, and pushes the tag (publishes): ```bash #!/usr/bin/env bash set -euo pipefail RECIPE="" BUMP="" RECIPE_DIR="${HOME}/.abra/recipes/${RECIPE}" COMPOSE="${RECIPE_DIR}/compose.yml" if [ ! -f "${COMPOSE}" ]; then echo "ERROR: ${COMPOSE} not found. Run 'abra recipe fetch ${RECIPE}' first." exit 1 fi # Current version (for the report only — abra computes the new one) CURRENT=$(grep -oP 'coop-cloud\.\$\{STACK_NAME\}\.version=\K[^\s"]+' "${COMPOSE}" | head -1 || true) # Map the bump type to the abra recipe release flag case "${BUMP}" in major) FLAG="-x" ;; minor) FLAG="-y" ;; patch) FLAG="-z" ;; *) echo "ERROR: unknown bump type '${BUMP}'"; exit 1 ;; esac # Bump the label + commit + tag + PUBLISH, all in one real release (NO --dry-run). # abra computes the correct a.b.c+x.y.z itself; do not hand-edit the label or hand-create the tag. abra recipe release "${RECIPE}" "${FLAG}" # Show the resulting version label NEW_VER=$(grep -oP 'coop-cloud\.\$\{STACK_NAME\}\.version=\K[^\s"]+' "${COMPOSE}" | head -1 || true) echo "" echo "Version: ${CURRENT:-?} -> ${NEW_VER:-?} (released + published)" ``` Substitute `` and `` with the parsed values, then run the script with `bash`. 3. **Report the result** — show the old and new version, and confirm the release was published.