-
Notifications
You must be signed in to change notification settings - Fork 71
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
vt version doesn't print the version number #59
Comments
This looks like
Builds attached to this page prints the version number correctly. Would you please consider a way to setup |
May be something like this: diff --git a/Makefile b/Makefile
index 9e76939..a8c9c3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,15 @@
# This how we want to name the binary output
BINARY=./build/vt
+COMMIT := $(shell git rev-parse --short HEAD)
+TAG := $(shell git describe --tags $(COMMIT))
+ifneq ($(shell git status --porcelain),)
+ COMMIT := dirty
+endif
+ifeq ($(VERSION),)
+ VERSION := $(TAG)-$(COMMIT)
+endif
+
# Setup the -ldflags option for go build here, interpolate the variable values
LDFLAGS=-ldflags "-X github.com/VirusTotal/vt-cli/cmd.Version=${VERSION}"
|
I tried downloading one of the binaries from our release downloads page (https://github.com/VirusTotal/vt-cli/releases/tag/0.10.4) and it worked:
The version is set in our release pipeline: vt-cli/.github/workflows/release.yaml Lines 23 to 30 in 6b82e3a
|
Probably it's the homebrew formula which needs to be fixed? https://github.com/Homebrew/homebrew-core/blob/master/Formula/virustotal-cli.rb |
I wanted to check my current vt CLI version (Homebrew) and was surprised to see
vt version
didn't print any version number.So I checked out the repo to find out this is a current problem:
And I verified on an old setup, this isn't a regression as of commit
031203cad77b
.The text was updated successfully, but these errors were encountered: