Skip to content

fix: version consistency and auto-tagging - #17

Merged
neuromechanist merged 4 commits into
mainfrom
fix/version-consistency
Jan 16, 2026
Merged

neuromechanist merged 4 commits into
mainfrom
fix/version-consistency

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

Summary

  • Read version from package.json at build time instead of hardcoded value
  • Add version bump script (scripts/bump-version.sh) for patch/minor/major bumps
  • Add CI workflow to auto-create git tags when version changes in main

Fixes #15

Test plan

  • Build CLI and verify nemar --version shows correct version
  • Run bump script locally and verify it updates package.json
  • Merge and verify auto-tag workflow creates v0.2.2 tag

- Replace npm with jq for version manipulation (CLAUDE.md compliance)
- Add set -euo pipefail for stricter error handling
- Show stderr on build and CLI execution failures
- Add package.json and git repository validation
- Use jq for reliable JSON parsing instead of grep/sed
- Add explicit warnings for CI fallback scenarios
- Quote all variables properly
@neuromechanist

Copy link
Copy Markdown
Contributor Author

Code Review Summary

Ran comprehensive PR review using code-reviewer and silent-failure-hunter agents. Found and fixed the following issues:

Critical Issues (Fixed)

Issue Location Fix
Build stderr suppressed bump-version.sh:51 Now shows errors with explicit error message
CLI version check stderr suppressed bump-version.sh:54 Now captures and displays errors

Important Issues (Fixed)

Issue Location Fix
Uses npm instead of bun bump-version.sh:35,46 Replaced with jq for version manipulation
No package.json validation bump-version.sh:26 Added existence and content validation
Fragile grep/sed parsing bump-version.sh:26 Replaced with jq -r '.version'
npm stderr suppressed bump-version.sh:46 Removed npm entirely

Medium Issues (Fixed)

Issue Location Fix
Missing set -u bump-version.sh:10 Added set -euo pipefail
Unquoted variables bump-version.sh:35 All variables now quoted
Git state not validated bump-version.sh:63-64 Added git repo validation and staged file warning
Silent CI fallbacks auto-tag.yml:29,48-51 Added ::notice:: and ::warning:: annotations

All fixes applied in commit 9d1207b.

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.

nemar --version returns the wrong version

1 participant