auto-tag: read the version from package.json #12

Merged
tim merged 1 commit from feat/auto-tag-package-json into main 2026-10-25 17:05:19 +00:00
Owner

auto-tag only understood a TOML version = "X.Y.Z" line, so Node projects (bunq-mcp) could not use it and were tagged by hand.

  • version-file ending in .json: parse as JSON, use the top-level version key (python3, no extra dependency). Anything else keeps the existing grep/sed lookup, so current callers are unaffected.
  • New fixture fixtures/package-json/package.json (version 0.0.2, a tag this repo does not have).
  • Self-test now asserts the tag output for both formats (v0.0.1 from the TOML fixture, v0.0.2 from package.json); before it only ran the dry run without checking anything.
  • Template and PATTERNS "Releases" mention package.json.

Checked locally in a throwaway repo with a bare remote, using the script from action.yml: TOML dry run, JSON dry run, JSON with an existing tag (empty output, exit 0), JSON without a version key (::error, exit 1), JSON real push, and the idempotent second run.

Merging is the release for every caller, so wait for the self-test to be green first.

🤖 Generated with Claude Code

https://claude.ai/code/session_0137rmvr4GcRbtoEvABScjsT

auto-tag only understood a TOML `version = "X.Y.Z"` line, so Node projects (bunq-mcp) could not use it and were tagged by hand. - `version-file` ending in `.json`: parse as JSON, use the top-level `version` key (python3, no extra dependency). Anything else keeps the existing grep/sed lookup, so current callers are unaffected. - New fixture `fixtures/package-json/package.json` (version 0.0.2, a tag this repo does not have). - Self-test now asserts the `tag` output for both formats (v0.0.1 from the TOML fixture, v0.0.2 from package.json); before it only ran the dry run without checking anything. - Template and PATTERNS "Releases" mention package.json. Checked locally in a throwaway repo with a bare remote, using the script from action.yml: TOML dry run, JSON dry run, JSON with an existing tag (empty output, exit 0), JSON without a version key (::error, exit 1), JSON real push, and the idempotent second run. Merging is the release for every caller, so wait for the self-test to be green first. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0137rmvr4GcRbtoEvABScjsT
auto-tag: read the version from package.json
All checks were successful
test auto-tag / test (pull_request) Successful in 3s
test docker-publish / test (pull_request) Successful in 3s
test forgejo-release / test (pull_request) Successful in 3s
test hassfest / test (pull_request) Successful in 21s
test node-test / test (pull_request) Successful in 6s
test python-test / test (pull_request) Successful in 15s
test security-scan / test (pull_request) Successful in 30s
e027144bf8
version-file ending in .json is parsed as JSON and its top-level
"version" key is used; other files keep the version = "X.Y.Z" line
lookup. The self-test now asserts the tag output for both formats.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0137rmvr4GcRbtoEvABScjsT
tim merged commit a8b7fa5900 into main 2026-10-25 17:05:19 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
tim/workflow-basics!12
No description provided.