Skip to content

fix: leave the build date out of --version when there is none - #132

Merged
maddie merged 1 commit into
librespeed:masterfrom
BKPepe:fix/version-without-build-date
Aug 11, 2026
Merged

maddie merged 1 commit into
librespeed:masterfrom
BKPepe:fix/version-without-build-date

Conversation

@BKPepe

@BKPepe BKPepe commented Aug 10, 2026

Copy link
Copy Markdown
Member

ProgName, ProgVersion and BuildDate are filled in by whoever builds the
binary. build.sh and .goreleaser.yml set all three, so a release is
unaffected — but a distribution packaging this commonly passes only the name
and the version, and --version then prints:

librespeed-cli 1.0.13 (built on )

Print the parenthesis only when there is a date to put in it:

librespeed-cli 1.0.13
librespeed-cli v1.0.13 (built on 2026-08-10)

Both forms checked on a build, along with the case where no -X flags are
passed at all.

ProgName, ProgVersion and BuildDate are filled in by whoever builds the
binary. build.sh and .goreleaser.yml set all three, but a distribution
packaging this commonly passes only the name and version, and --version then
prints a bare "(built on )".

Print the parenthesis only when there is a date to put in it.
Copilot AI lite review requested due to automatic review settings August 10, 2026 13:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maddie
maddie merged commit 8398753 into librespeed:master Aug 11, 2026
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.

3 participants