mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-12-04 00:15:41 -08:00
Sync upstream v3.2.4: slim install refs, a crash-safe installer, Change project restarts the agent (v3.2.4)
AI Assisted
This commit is contained in:
1 parent
50319aa332
commit
f997a82c4d
45 files changed
+7851
-306
No files matched your search
@@ -118,7 +118,7 @@ If the user supplies a suffix, set `title = "v$CHANGELOG_VERSION " + <suffix>` (
|
||||
|
||||
### Step 9 - Publish (on approval)
|
||||
|
||||
The release is created by the `release-app` workflow, **last**, not by this skill. The workflow builds the app on four systems, attaches every file to a draft release, and only then publishes it, so the `vX.Y.Z` tag (which the app's update check watches) never exists before its binaries do; its last step then fast-forwards the `release` branch (what the README installs from) to the new tag, and fails loudly if the tag is not ahead of the branch. Creating the release here with `gh release create` would put the tag up first and leave users offered an upgrade with nothing to download. Do not do that.
|
||||
The release is created by the `release-app` workflow, **last**, not by this skill. The workflow builds the app on four systems, attaches every file to a draft release, and only then publishes it, so the `vX.Y.Z` tag (which the app's update check watches) never exists before its binaries do; its last step runs `scripts/publish-install-refs.mjs`, which publishes one synthetic slim runtime commit as immutable `install-vX.Y.Z` and as the fast-forward `release` branch tip (what the README installs from), and fails loudly if either ref cannot be published safely. Creating the release here with `gh release create` would put the tag up first and leave users offered an upgrade with nothing to download. Do not do that.
|
||||
|
||||
On approval, write `$notes` to a temp file, never inline (multiline text on the command line is a quoting bug). `$notes` must already hold **real newlines** (per Step 8) because `printf '%s'` / `WriteAllText` write it byte-for-byte, and the file MUST be **UTF-8** because the notes contain emoji. Then start the workflow on `main`, passing the file as the `notes` input (`-F key=@file` reads the file's contents):
|
||||
|
||||
@@ -149,7 +149,7 @@ gh run list --repo jparkerweb/plan2code --workflow release-app.yml --event workf
|
||||
gh run watch <databaseId> --repo jparkerweb/plan2code --exit-status
|
||||
```
|
||||
|
||||
If the run list shows a run that started before the dispatch, wait a few seconds and list again. If the run fails, show which job failed and stop: no release or tag exists yet (a failed run leaves at most an unpublished draft, which a re-run reuses). Never publish a release by hand to get around a failed build.
|
||||
If the run list shows a run that started before the dispatch, wait a few seconds and list again. If the run fails, show which job failed and stop. A failure in a build job leaves no release or tag (at most an unpublished draft, which a re-run reuses). A failure in the last step, **Publish the install refs**, is different: the release and `vX.Y.Z` are already public, only `install-vX.Y.Z` and the `release` branch move are missing. Users still update correctly (a default update falls back to the plain tag, just slower), but say so, and recover with `gh run rerun <databaseId> --repo jparkerweb/plan2code --failed`, which keeps the same commit; re-running this skill stops at Step 7 because the release exists, and a fresh dispatch fails once `main` has moved. Never publish a release by hand to get around a failed build.
|
||||
|
||||
### Step 10 - Verify
|
||||
|
||||
@@ -159,7 +159,7 @@ Confirm the release now exists, is published (not a draft) and carries the files
|
||||
gh release view "$tag" --repo jparkerweb/plan2code --json url,isDraft,assets -q '.url, .isDraft, (.assets | length)'
|
||||
```
|
||||
|
||||
Expect `false` for the draft flag and five assets (four binaries and the SHA256SUMS file). Report the release URL to the user.
|
||||
Expect `false` for the draft flag and five assets (four binaries and the SHA256SUMS file). Then verify the install refs too: `git ls-remote --tags origin refs/tags/install-$tag` names the new immutable tag, and `git ls-remote --heads origin release` names the same synthetic commit. If either is missing, the refs step failed: recover as Step 9 says (`gh run rerun <databaseId> --failed`). Report the release URL to the user.
|
||||
|
||||
## Rules
|
||||
|
||||
|
||||
Reference in new issue
Block a user