Skip to content

Prepare the v1.2.0 tag: install pins, date, and a package OOBT - #10

Open
jvmvik wants to merge 1 commit into
masterfrom
release-prep
Open

jvmvik wants to merge 1 commit into
masterfrom
release-prep

Conversation

@jvmvik

@jvmvik jvmvik commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Fixes the blockers from the v1.2.0 release review. Also adds a check that installs the published package the way a user would.

Docs that ship inside the tag

README.md is in build.zig.zon .paths, so these must be right in the tagged commit:

  • Install commands pin v1.2.0: both the git form (README.md:26, :49) and the tarball form (:80). The pinned-dependency example keeps v1.1.0 until the tag exists; rake release refreshes it afterwards.
  • 1.2.0 is dated 2026-12-04 in CHANGELOG.md and the README Changelog section. If the release happens on another day, rake release:docs says so before anything is tagged.
  • Coverage figure: 98.29% (975 of 992), from CI on 486112d.
  • CHANGELOG: entries for the Windows CI job and its error.Unexpected caveat, plus the rake changes below.

Release automation (Rakefile)

  • rake oobt:package: a standalone consumer project in oobt/package/ that lists no dependency in git. The task copies it to a temporary directory and runs zig fetch --save 'git+https://github.com/serpapi/serpapi-zig#<ref>' there. It then builds and runs oobt/demo.zig (a search plus an image upload) against what was fetched. REF selects the ref; the default is the release tag.
  • rake release:docs: fails unless CHANGELOG.md and the README Changelog section announce the build.zig.zon version, dated today, and every README install command pins it.
  • rake release:
    • Preflight now fetches and requires HEAD == origin/master. Before, a checkout that was 5 commits behind would have tagged an older commit.
    • It pushes only the new tag, not master --tags.
    • After pushing, it runs oobt:package on the tag, checks that the fetched hash is serpapi-<version>-…, and rewrites the README pinned-dependency example with the fetched URL and hash, for a follow-up commit.

Testing

  • zig build lint: pass, including oobt/package.
  • ruby -c Rakefile: OK. rake --tasks lists oobt:package[ref] and release:docs.
  • rake release:docs passes on this tree. On throwaway copies it fails with a clear message for each of:
    • a stale git pin
    • a stale tarball pin
    • an old CHANGELOG date
    • an old README date
    • a version bump without a CHANGELOG entry
  • update_readme_pin on a copy rewrites exactly the 3 lines of the pinned-dependency example.
  • REF=release-prep rake oobt:package (live):
    • resolved release-prep to b1232cc and fetched it from GitHub
    • built it in a fresh project, ran 1 search and 1 upload, and printed serpapi-zig 1.2.0 out-of-box test: success
    • recorded serpapi-1.2.0-PYmxE7D5AQDEmIb6pPGS2BCF9clAIoNgnXdl_euc17Ly
    • left the working tree clean
  • Not run: rake release itself, and oobt:package on a real tag (none exists yet).

After merge

Merge on the day you release, or update the two dates first; rake release:docs will tell you which. Then:

git switch master && git pull --ff-only
rake release   # checks, tags v1.2.0, pushes the tag, fetches it, refreshes the README example
git commit -am "README: pinned-dependency example for v1.2.0"   # then open a PR for it
gh release create v1.2.0 --title v1.2.0 --notes-file <(awk '/^## 1.2.0/{f=1;next} /^## /{f=0} f' CHANGELOG.md) --latest

🤖 Generated with Claude Code

- README install commands pin v1.2.0 (git and tarball forms); the
  pinned-dependency example keeps v1.1.0 until the tag exists
- 1.2.0 is dated 2026-12-04 in CHANGELOG.md and the README
- README coverage figure: 98.29% (975 of 992), CI on 486112d
- rake oobt:package: copy oobt/package, a standalone consumer project,
  to a temp dir, zig fetch --save a git ref of this repo from GitHub
  (REF, default the release tag), and run oobt/demo.zig against it
- rake release:docs: refuse to release unless CHANGELOG.md and the README
  announce the build.zig.zon version, dated today, with matching pins
- rake release: preflight requires HEAD == origin/master after a fetch;
  push only the new tag; then run oobt:package on it, check the fetched
  version and refresh the README pinned-dependency example
- CHANGELOG: Windows CI and its error.Unexpected caveat

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant