From 01aa7b63302ac17f926357e0752574316e612d9a Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 29 Jul 2026 17:19:27 -0500 Subject: [PATCH 1/2] Point release tagging at the upstream remote explicitly, not origin origin in this checkout is the jnasbyupgrade fork, not the canonical Postgres-Extensions/pg_count_nulls repo, so make tag/make dist have always been one `git remote -v` slip away from tagging the wrong repo. pgxntool 2.2.0 (Postgres-Extensions/pgxntool#53) made the tagging targets' remote configurable via PGXN_REMOTE instead of hardcoding origin, so this sets PGXN_REMOTE = upstream here and drops the RELEASE.md step that relied on the release-runner remembering to check origin by hand. --- Makefile | 5 +++++ RELEASE.md | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3f08c82..9422788 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ include pgxntool/base.mk +# origin is the jnasbyupgrade fork, not the canonical repo -- point tag/dist +# at the real remote explicitly instead of relying on whoever runs `make tag` +# to remember (see pgxntool#53). +PGXN_REMOTE = upstream + # Temporary hack testdeps: $(wildcard test/*/*.sql) $(wildcard test/*.sql) # Be careful not to include directories in this diff --git a/RELEASE.md b/RELEASE.md index bc73c65..079c037 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -111,14 +111,14 @@ it's worth a direct look before relying on it. "Untracked changes!" on a dirty tree. - [ ] `make tag` — creates a git tag named exactly the DISTRIBUTION version, UNPREFIXED (e.g. `1.0.0`, no `v` prefix), taken from `PGXNVERSION`, and pushes - it to `origin`. **Make sure `origin` in your checkout actually points at the - real upstream repo, not a personal fork.** If this project has used a - different release-tracking scheme before (release branches, no tracking at - all, etc.), `make tag` is the sole mechanism going forward once migrated. It's - idempotent when the tag already points at HEAD, and errors if the tag exists - on a different commit. To move an existing tag use `make forcetag` - (= `make rmtag` then `make tag`); `make rmtag` deletes the tag locally and on - `origin`. + it to `upstream` (this project's `Makefile` sets `PGXN_REMOTE = upstream`, + since `origin` here is the `jnasbyupgrade` fork, not the canonical repo — see + pgxntool#53). If this project has used a different release-tracking scheme + before (release branches, no tracking at all, etc.), `make tag` is the sole + mechanism going forward once migrated. It's idempotent when the tag already + points at HEAD, and errors if the tag exists on a different commit. To move + an existing tag use `make forcetag` (= `make rmtag` then `make tag`); + `make rmtag` deletes the tag locally and on `upstream`. - [ ] `make dist` — depends on `tag` (and builds the HTML docs), then `git archive`s the tag into a distribution zip in the parent directory. Because it archives the tag, only committed files are included. If a From d5c51f0d4991ae11343944d2a4e62eb1f0d164d8 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Thu, 30 Jul 2026 16:22:39 -0500 Subject: [PATCH 2/2] Document PGXN_REMOTE instead of hardcoding it, matching cat_tools' pattern Hardcoding PGXN_REMOTE = upstream in the Makefile bakes in an assumption specific to this maintainer's clone (that origin is the jnasbyupgrade fork), which doesn't generalize to anyone else's checkout. Following Postgres-Extensions/cat_tools#52: leave the Makefile untouched (PGXN_REMOTE still defaults to origin via pgxntool's base.mk) and instead document in RELEASE.md that whoever runs the release should pass PGXN_REMOTE=upstream on the command line when their origin is a personal fork. --- Makefile | 5 ----- RELEASE.md | 24 ++++++++++++++++-------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 9422788..3f08c82 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,5 @@ include pgxntool/base.mk -# origin is the jnasbyupgrade fork, not the canonical repo -- point tag/dist -# at the real remote explicitly instead of relying on whoever runs `make tag` -# to remember (see pgxntool#53). -PGXN_REMOTE = upstream - # Temporary hack testdeps: $(wildcard test/*/*.sql) $(wildcard test/*.sql) # Be careful not to include directories in this diff --git a/RELEASE.md b/RELEASE.md index 079c037..6f95364 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -107,18 +107,26 @@ it's worth a direct look before relying on it. committed files only.) ## 6. Tag and distribute + +> **⚠️ Pass `PGXN_REMOTE=upstream` to every target below if your clone's `origin` +> is a personal fork** (as it typically is for a maintainer working from a fork +> with the canonical repo configured as a separate `upstream` remote). Without +> it, `tag`/`rmtag`/`forcetag`/`dist` push to `origin` by default — silently +> tagging the fork instead of `Postgres-Extensions/pg_count_nulls`. pgxntool +> 2.2.0 added `PGXN_REMOTE` specifically to fix this +> (https://github.com/Postgres-Extensions/pgxntool/issues/53). + - [ ] Commit the release changes; working tree must be clean — `make tag` aborts with "Untracked changes!" on a dirty tree. - [ ] `make tag` — creates a git tag named exactly the DISTRIBUTION version, UNPREFIXED (e.g. `1.0.0`, no `v` prefix), taken from `PGXNVERSION`, and pushes - it to `upstream` (this project's `Makefile` sets `PGXN_REMOTE = upstream`, - since `origin` here is the `jnasbyupgrade` fork, not the canonical repo — see - pgxntool#53). If this project has used a different release-tracking scheme - before (release branches, no tracking at all, etc.), `make tag` is the sole - mechanism going forward once migrated. It's idempotent when the tag already - points at HEAD, and errors if the tag exists on a different commit. To move - an existing tag use `make forcetag` (= `make rmtag` then `make tag`); - `make rmtag` deletes the tag locally and on `upstream`. + it to `$(PGXN_REMOTE)` (default `origin`). If this project has used a + different release-tracking scheme before (release branches, no tracking at + all, etc.), `make tag` is the sole mechanism going forward once migrated. It's + idempotent when the tag already points at HEAD, and errors if the tag exists + on a different commit. To move an existing tag use `make forcetag` + (= `make rmtag` then `make tag`); `make rmtag` deletes the tag locally and on + `$(PGXN_REMOTE)`. - [ ] `make dist` — depends on `tag` (and builds the HTML docs), then `git archive`s the tag into a distribution zip in the parent directory. Because it archives the tag, only committed files are included. If a