diff --git a/docs/migrations.md b/docs/migrations.md index 92089d2..c4ec8c5 100644 --- a/docs/migrations.md +++ b/docs/migrations.md @@ -2,9 +2,9 @@ Follow the section for the version you are adopting. Migration notes are listed newest first. -## vNext +## 0.5 -vNext requires every version-1 `.patchlane.yml` file to define `allowedWorkflows` and updates generated workflows to authenticate with a GitHub App. Patchlane implicitly includes its generated `sync-upstream.yml` and `promote-tested-sync.yml` workflows, so list only repository-specific workflows. +Patchlane 0.5 requires every version-1 `.patchlane.yml` file to define `allowedWorkflows` and updates generated workflows to authenticate with a GitHub App. Patchlane implicitly includes its generated `sync-upstream.yml` and `promote-tested-sync.yml` workflows, so list only repository-specific workflows. ### 1. Inventory the composed workflow tree @@ -53,15 +53,15 @@ gh variable set PATCHLANE_APP_CLIENT_ID --repo "$FORK" --body "YOUR_APP_CLIENT_I gh secret set PATCHLANE_APP_PRIVATE_KEY --repo "$FORK" < /path/to/app-private-key.pem ``` -Replace both generated workflow files with the vNext templates. Do not merely pass `github.token` as `GH_TOKEN`: that fixes API authentication, but pushes made by the built-in `GITHUB_TOKEN` do not start the required downstream workflow runs. +Replace both generated workflow files with the 0.5 templates. Do not merely pass `github.token` as `GH_TOKEN`: that fixes API authentication, but pushes made by the built-in `GITHUB_TOKEN` do not start the required downstream workflow runs. ### 4. Validate before rollout -After pushing the updated patch refs, validate with the vNext package version selected for the migration: +After pushing the updated patch refs, validate with Patchlane 0.5: ```bash -npx patchlane@VERSION doctor -npx patchlane@VERSION sync --dry-run +npx patchlane@0.5.0 doctor +npx patchlane@0.5.0 sync --dry-run ``` Doctor should identify every unexpected or missing workflow by filename. The dry run validates the actual output after all configured patches are replayed without changing the local or remote sync branch. @@ -71,13 +71,13 @@ Doctor should identify every unexpected or missing workflow by filename. The dry Update the pinned Patchlane version in the sync and promotion workflows as part of the same configuration patch. From that patch branch, use the new client for the first policy-enforced rebuild and promotion: ```bash -npx patchlane@VERSION bootstrap --wait +npx patchlane@0.5.0 bootstrap --wait ``` This validates the allowlist before publishing `sync/integration`, waits for CI on the exact published SHA, revalidates that SHA, and then promotes it. Confirm afterward that the generated base contains the intended workflow set and that scheduled syncs use the new Patchlane version. Then validate the uploaded App credentials with a no-push workflow run: ```bash -npx patchlane@VERSION verify-auth +npx patchlane@0.5.0 verify-auth ``` ### 6. Optionally enable maintainer notifications @@ -101,7 +101,7 @@ notifications: closeOnRecovery: true ``` -Update both generated workflow files from the vNext templates in the same patch: +Update both generated workflow files from the 0.5 templates in the same patch: - `sync-upstream.yml` must request `permission-issues: write` for its App token, report `sync-failed` after a failed sync, and optionally report recovery after success. - `promote-tested-sync.yml` must request `permission-issues: write` in jobs that report issues, report unsuccessful CI workflow runs, report failed promotions, and optionally report each recovery. diff --git a/examples/promote-tested-sync.yml b/examples/promote-tested-sync.yml index f67e2fb..cf3af58 100644 --- a/examples/promote-tested-sync.yml +++ b/examples/promote-tested-sync.yml @@ -33,7 +33,7 @@ jobs: node-version: '22' - name: Run patchlane promote - run: npx patchlane@0.4.1 promote + run: npx patchlane@0.5.0 promote env: GH_TOKEN: ${{ steps.patchlane-token.outputs.token }} EXPECTED_SYNC_SHA: ${{ github.event.workflow_run.head_sha }} diff --git a/examples/sync-upstream.yml b/examples/sync-upstream.yml index 5e791b8..aa8600b 100644 --- a/examples/sync-upstream.yml +++ b/examples/sync-upstream.yml @@ -52,7 +52,7 @@ jobs: node-version: '22' - name: Run patchlane sync - run: npx patchlane@0.4.1 sync + run: npx patchlane@0.5.0 sync env: GH_TOKEN: ${{ steps.patchlane-token.outputs.token }} UPSTREAM_SOURCE: ${{ inputs.source }} diff --git a/package-lock.json b/package-lock.json index e896f08..284e829 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "patchlane", - "version": "0.4.1", + "version": "0.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "patchlane", - "version": "0.4.1", + "version": "0.5.0", "license": "MIT", "dependencies": { "cac": "^7.0.0", diff --git a/package.json b/package.json index aa3c3ff..7c67688 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "patchlane", - "version": "0.4.1", + "version": "0.5.0", "description": "CLI tool for maintaining forked repositories with custom patches", "type": "module", "bin": { diff --git a/skills/patchlane-fork-setup/assets/promote-tested-sync.yml b/skills/patchlane-fork-setup/assets/promote-tested-sync.yml index f67e2fb..cf3af58 100644 --- a/skills/patchlane-fork-setup/assets/promote-tested-sync.yml +++ b/skills/patchlane-fork-setup/assets/promote-tested-sync.yml @@ -33,7 +33,7 @@ jobs: node-version: '22' - name: Run patchlane promote - run: npx patchlane@0.4.1 promote + run: npx patchlane@0.5.0 promote env: GH_TOKEN: ${{ steps.patchlane-token.outputs.token }} EXPECTED_SYNC_SHA: ${{ github.event.workflow_run.head_sha }} diff --git a/skills/patchlane-fork-setup/assets/sync-upstream.yml b/skills/patchlane-fork-setup/assets/sync-upstream.yml index 5e791b8..aa8600b 100644 --- a/skills/patchlane-fork-setup/assets/sync-upstream.yml +++ b/skills/patchlane-fork-setup/assets/sync-upstream.yml @@ -52,7 +52,7 @@ jobs: node-version: '22' - name: Run patchlane sync - run: npx patchlane@0.4.1 sync + run: npx patchlane@0.5.0 sync env: GH_TOKEN: ${{ steps.patchlane-token.outputs.token }} UPSTREAM_SOURCE: ${{ inputs.source }}