Skip to content

Commit 4a36c53

Browse files
authored
fix(ci): remove jq version rewrite, add META.json check to release skill (#52)
The pgxn-tools container doesn't have jq. Instead, META.json will be bumped manually before tagging (matching pg_clickhouse convention). Updated the create-new-release skill to verify META.json version matches the new tag before pushing.
1 parent c9203f1 commit 4a36c53

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

.claude/skills/create-new-release/SKILL.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,23 @@ Create and push a new semantic version release tag.
2626
- **minor**: `v1.2.3``v1.3.0`
2727
- **major**: `v1.2.3``v2.0.0`
2828

29-
5. **Validate current commit exists on remote**:
29+
5. **Verify META.json version matches the new tag**:
30+
Read `META.json` and check that both `version` and `provides.pg_stat_ch.version` match the new version (without the `v` prefix). If they don't match, abort and tell the user to update `META.json` first — PGXN uses this file for the release version.
31+
32+
6. **Validate current commit exists on remote**:
3033
```bash
3134
git fetch origin
3235
git branch -r --contains HEAD
3336
```
3437
If no remote branch contains HEAD, abort with an error asking the user to push their commits first.
3538

36-
6. **Create and push the tag**:
39+
7. **Create and push the tag**:
3740
```bash
3841
git tag -a <new_version> -m "Release <new_version>"
3942
git push origin <new_version>
4043
```
4144

42-
7. **Report success** with the new tag name.
45+
8. **Report success** with the new tag name.
4346

4447
## Version Parsing
4548

.github/workflows/pgxn.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@ jobs:
1010
- name: Check out the repo
1111
uses: actions/checkout@v4
1212
with: { submodules: recursive, fetch-depth: 0 }
13-
- name: Set version from tag
14-
if: startsWith( github.ref, 'refs/tags/v' )
15-
run: |
16-
VERSION="${GITHUB_REF#refs/tags/v}"
17-
jq --arg v "$VERSION" '.version = $v | .provides.pg_stat_ch.version = $v' META.json > META.tmp
18-
mv META.tmp META.json
1913
- name: Bundle the Release
2014
env: { GIT_ARCHIVE_CMD: archive-all }
2115
id: bundle

0 commit comments

Comments
 (0)