Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [ISSUE] [CLOSED] age does not have version number set
Date: Fri, 03 Dec 2021 04:53:20 +0100	[thread overview]
Message-ID: <20211203035320.pcALH41b1nPWuQbXnW1E2x2-rIs2UzGdAPIV6kxckRA@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-34343@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]

Closed issue by twpayne on void-packages repository

https://github.com/void-linux/void-packages/issues/34343

Description:
### 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:

```console
# age --version
1.0.0
```

### Actual behavior

`age --version` prints `(devel)`:

```console
# age --version
(devel)
```

### Steps to reproduce the behavior

```console
$ 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](https://github.com/FiloSottile/age/blob/main/.github/workflows/build.yml#L34).

      reply	other threads:[~2021-12-03  3:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  5:56 [ISSUE] " twpayne
2021-12-03  3:53 ` sgn [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211203035320.pcALH41b1nPWuQbXnW1E2x2-rIs2UzGdAPIV6kxckRA@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).