Skip to content

Conversation

@linyows
Copy link
Owner

@linyows linyows commented Jan 20, 2026

Summary

  • Extract usage text to src/assets/usage.txt for easier maintenance
  • Centralize version management by reading from build.zig.zon via build options
  • Update release workflow to automatically set version from git tag
  • Use 0.0.0-dev as placeholder version in repository (replaced during release)

Test plan

  • zig build succeeds
  • zig build test passes
  • draft version shows 0.0.0-dev for local builds
  • Release workflow sets correct version from tag

🤖 Generated with Claude Code

linyows and others added 2 commits January 20, 2026 18:02
- Extract usage text to src/assets/usage.txt using @embedfile
- Read version from build.zig.zon via build options
- Update release workflow to set version from git tag
- Use 0.0.0-dev as placeholder version in repository

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@linyows linyows requested a review from Copilot January 20, 2026 09:22
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes version management and extracts usage text to improve maintainability. The version is now read from build.zig.zon via build options, and the release workflow automatically updates it from git tags. The usage text has been moved to a separate asset file for easier editing.

Changes:

  • Extracted usage text from inline string to src/assets/usage.txt
  • Centralized version management by reading from build.zig.zon through build options
  • Updated release workflow to set version from git tag before building

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/main.zig Imports build options and usage text file; updates version and usage display functions
src/assets/usage.txt New file containing the extracted usage text with updated ASCII art
build.zig.zon Sets placeholder version 0.0.0-dev with comment explaining replacement during release
build.zig Adds build options to pass version from build.zig.zon to compiled binary
.github/workflows/release.yml Adds step to update version in build.zig.zon from git tag before building

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 39 to 40
sed -i.bak "s/\.version = \"[^\"]*\",/.version = \"${VERSION}\",/" build.zig.zon
rm -f build.zig.zon.bak
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sed command uses -i.bak which creates a backup file on macOS/BSD but behaves differently on Linux. For cross-platform compatibility in GitHub Actions (which runs on Linux), use sed -i without the .bak extension, then remove the separate rm -f build.zig.zon.bak line.

Suggested change
sed -i.bak "s/\.version = \"[^\"]*\",/.version = \"${VERSION}\",/" build.zig.zon
rm -f build.zig.zon.bak
sed -i "s/\.version = \"[^\"]*\",/.version = \"${VERSION}\",/" build.zig.zon

Copilot uses AI. Check for mistakes.
linyows and others added 3 commits January 20, 2026 18:32
Remove unnecessary .bak extension and cleanup since GitHub Actions runs on Linux

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use prefers-color-scheme media query to switch fill color:
- Light mode: black (#000000)
- Dark mode: white (#ffffff)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix logo image URL to point to correct repository
- Add README.ja.md with Japanese translation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@linyows linyows merged commit 464145c into main Jan 20, 2026
3 checks passed
@linyows linyows deleted the feature/centralize-version branch January 20, 2026 09:40
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.

2 participants