Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

age does not have version number set #34343

Closed
twpayne opened this issue Dec 2, 2021 · 0 comments · Fixed by #34346
Closed

age does not have version number set #34343

twpayne opened this issue Dec 2, 2021 · 0 comments · Fixed by #34346

Comments

@twpayne
Copy link

twpayne commented Dec 2, 2021

System

  • xuname:
    Void 5.4.0-86-generic x86_64 GenuineIntel uptodate rFF
  • package:
    age-1.0.0_1

Expected behavior

age --version should print age's version number:

# age --version
1.0.0

Actual behavior

age --version prints (devel):

# age --version
(devel)

Steps to reproduce the behavior

$ docker run -it ghcr.io/void-linux/void-linux:20211130rc01-full-x86_64 /bin/sh
# xbps-install --sync --update --yes age
...
[*] Configuring unpacked packages
age-1.0.0_1: configuring ...
age-1.0.0_1: installed successfully.

1 downloaded, 1 installed, 0 updated, 1 configured, 0 removed.
# age --version
(devel)

Explanation

age's version number needs to be set a build time by passing

-ldflags "-X main.Version=$VERSION"

to go build. For an example, see age's own build GitHub Action.

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 a pull request may close this issue.

1 participant