Repository navigation
feat: Add --version to every command - #35
Merged
Merged
Conversation
sv-helper and every alias (svls, sv-enable and the rest), rsvlog and runsvdir.sh all take --version. sv-helper also takes a `version` subcommand. Output is GNU style: `sv-helper 4.1.0` by its own name, `svls (sv-helper) 4.1.0` through an alias. Each is answered before anything else runs. rsvlog answers outside a log directory. runsvdir.sh never resolves, creates or supervises a tree. A regular user's svls creates nothing. An installed script has no version.txt beside it, so each script carries its own version, on a line release-please rewrites through the x-release-please-version marker. The scripts and the README's example are added to extra-files. test/version.bats fails if a marked file is missing from extra-files, or holds a version other than version.txt's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bougyman
approved these changes
Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every command takes
--version, andsv-helperalso takes aversionsubcommand:The format is GNU style. Through an alias, the output names the package the alias belongs to.
Each command answers before doing anything else:
rsvlog --versionworks outside a log directory, ahead of its./run-only checks.runsvdir.sh --versionnever resolves, creates or supervises a tree.svls --versioncreates nothing under$HOME.Where the version comes from
An installed script has no
version.txtbeside it, so each script carries its ownsv_version=... # x-release-please-versionline. All three scripts are added to release-please'sextra-files, next toPKGBUILD. So is the README's example, which uses the block markers (checked against release-please'sdocs/customizing.md).test/version.batsfails if a file carrying a marker is missing fromextra-files, or holds a version other thanversion.txt's. I broke each check on purpose to confirm it fails.docs/releasing.mdexplains how this works.make testpasses locally (114 tests).🤖 Generated with Claude Code