pdulvp.fr

`prel public-release` and `prel reapply-releases` has been fixed.

See more details at : https://github.com/pdulvp/prel/issues/19

  • new publicReleasesRepository key in prel.config.json (owner/repo) naming a second GitHub repository for releases
  • new prel public-release <version|level|current> command: clones that repository to a temp dir, writes the same version file there, commits, tags, pushes, creates the GitHub release with this repository's notes and uploads the artifacts copied from this repository's tree - no build runs, and the source repository is never written
  • version words (major/minor/micro/current), -n, -m, --draft behave as in prel release; a tag already on the target is a no-op; a missing artifact stops before anything is cloned
  • new prel reapply-releases command: after a history rewrite, re-points each diverged tag (its commit no longer an ancestor of HEAD) at the local commit with the same message, locally and on the remote, then recreates its GitHub release with the same title, notes, flags and assets re-uploaded, and finally force-pushes the branch with a lease on the remote tip
  • non-diverged tags are left alone; annotated tags stay annotated with their message and tagger; -n is a dry run that pushes, deletes and creates nothing

prel public-release: publish a release on the public releases repository

<sub>2026-11-05-1130-prel-public-release.md — 2026-11-05 11:30</sub>

Goal: replace the automatic mirror step 10 in prel release with a dedicated
command, prel public-release <version|level|current>, that reads
publicReleasesRepository from prel.config.json and publishes the release on
that second GitHub repository: clone it to a temp dir, write the same version
file there, commit, tag, push, create the GitHub release with the notes of the
original repository and upload the artifacts copied from the original
repository's tree. The original repository is only read, never written.

Steps:

  • [x] Write this plan
  • [x] scripts/release.sh: automatic mirror removed; the file is back to its

original content (git diff empty)

  • [x] scripts/public-release.sh: new command reusing the _rel_* helpers;

resolves the version word, checks the key (set, owner/repo shape, gh
usable), expands the artifact patterns in the original repo (missing = stop
before cloning), clones/tags/pushes/publishes on the target; -n, --draft,
-m; usage

  • [x] scripts/config.sh: publicReleasesRepository usage text points at

prel public-release

  • [x] README.md: release section back to nine steps; config key kept; new

prel public-release section

  • [x] Verify with the stub-gh harness: prel release no longer mirrors;

prel public-release 1.3.0 clones, writes VERSION=1.3.0 in the clone, tags
v1.3.0, pushes, creates the release with --repo and uploads the artifact
copied from the source tree; rerun is a no-op; dry run; level words; unset
key / bad slug / bad type / missing artifacts all stop before cloning;
source tree untouched; direct execution of the script works

  • [x] Mark plan complete, refresh docs/plans/sumup.md

prel reapply-releases: move diverged tags and releases onto the rewritten commits

<sub>2026-11-05-2244-reapply-releases.md — 2026-11-05 22:44</sub>

Goal: after prel exclude-from-git rewrote the local branch, the tags and
GitHub releases on the remote still point at the old commits. The new command
prel reapply-releases re-points each diverged tag at the local commit with
the same message, recreates its GitHub release (same title, notes, flags, and
the same assets re-uploaded), then force-pushes the local branch onto the
same-named remote branch. Tags whose commit is still an ancestor of HEAD have
not diverged and are left alone.

Steps:

  • [x] Read the script conventions (exclude-from-git.sh, public-release.sh,

release.sh), the docs/plans/ convention, and the git/gh state

  • [x] Archive the completed public-release plan; write this plan
  • [x] scripts/reapply-releases.sh: usage; fetch the remote tags into a temp

namespace; a tag diverged when its peeled commit is not an ancestor of
HEAD; map old -> new commit by exact message bytes (author date as
tiebreaker); re-tag locally (annotated stays annotated, message and
tagger kept) and git push --force the tag; recreate the release with
gh release delete --yes + gh release create (title/notes/draft/
prerelease kept) after downloading its assets, and re-upload them with
--clobber; finally git push --force-with-lease HEAD onto the remote
branch; -n changes nothing

  • [x] README.md: a prel reapply-releases section next to exclude-from-git
  • [x] Verify: prel usage lists the command; in this clone (no divergence)

the dry run reports nothing to do; in a scratch clone with an amended
tip, the dry run maps the diverged tag old -> new and skips the rest;
a full run against a bare remote with a stub gh moved the tag (still
annotated, tagger and message kept), recreated the release in the order
download -> delete -> create -> upload, and force-pushed the branch,
leaving the 10 non-diverged tags alone

  • [x] Mark complete, refresh docs/plans/sumup.md, archive the plan

<sub>Filed by prel from the completed plans at commit time.</sub>