Possibly building using `gh`'s own build scripts (to display version via `gh version`)
chemotaxis opened this issue · 0 comments
- I read the conda-forge documentation and could not find the solution for my problem there.
Issue:
First of all, thanks for providing this feedstock!
I was installing a new conda environment and I wanted to verify the version of gh
I installed using the command gh version
, but I only got this:
$gh version
gh version DEV
https://github.com/cli/cli/releases/latest
What I was hoping to see was something like this:
$gh version
gh version 1.11.0 (2021-06-03)
https://github.com/cli/cli/releases/tag/v1.11.0
The date is when the current executable was built.
I'm aware that I could just run conda list
to see the version, but I think it'd be nice to be able to do it via gh version
as well. The url would also refer to the correct change log instead of always the latest.
The gh
project has a cross-platform build script. Normally, in development, the version is set to the latest git tag and latest commit hash (not always referring to the same commit). But since you're building with just the source, you can set the version using the GH_VERSION
environment variable, as shown here (link).
I tested this:
# In the root directory
$export GH_VERSION=1.11.0
$go run script/build.go bin/gh
This creates a directory bin
with the executable inside. Running this executable gave this:
$./bin/gh version
gh version 1.11.0 (2021-06-04)
https://github.com/cli/cli/releases/tag/v1.11.0
This should be a pretty simple change to the recipes. I'd be happy to submit a pull request, if you'd like.
Environment (
conda list
):
$ conda list
# packages in environment at /envs/gh-test:
#
# Name Version Build Channel
gh 1.10.3 h990441c_0 conda-forge
Details about
conda
and system ( conda info
):
$ conda info