Comments (4)
Probably it's the homebrew formula which needs to be fixed? https://github.com/Homebrew/homebrew-core/blob/master/Formula/virustotal-cli.rb
from vt-cli.
This looks like VERSION
isn't set by defaults. On setting VERSION manually, this does work:
vt-cli (master)> make clean
rm -rf ./build
vt-cli (master)> env VERSION=test make
go build -ldflags "-X github.com/VirusTotal/vt-cli/cmd.Version=test" -o ./build/vt ./vt/main.go
vt-cli (master)> ./build/vt version
vt-cli test
Builds attached to this page prints the version number correctly.
Would you please consider a way to setup VERSION
on manual build? ex: closest tag dash closest commit
from vt-cli.
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}"
from vt-cli.
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:
$ ./vt version
vt-cli 0.10.4
The version is set in our release pipeline:
vt-cli/.github/workflows/release.yaml
Lines 23 to 30 in 6b82e3a
from vt-cli.
Related Issues (20)
- How is the `behash` value calculated? HOT 1
- Unable to obtain more than 100 results per lookup HOT 2
- How to scan contents of a folder? HOT 3
- vt-cli init not saving the conf file with an a bytes-like object is required, not 'str' HOT 1
- Installation issue on macOS HOT 1
- Make Virustotal Downloader For Telegram Bot HOT 3
- -bash: vt: command not found HOT 6
- How do I turn off the --verbose flag? HOT 7
- Show the analysis result before scanning the file again, just like the web GUI? HOT 7
- VT CLI Download Error HOT 2
- More options for config location, e.g. XDG_CONFIG_HOME
- Make issue (Debian) HOT 6
- > Please, consider supporting [Flatpak](http://docs.flatpak.org/en/latest/introduction.html#reasons-to-use-flatpak) and publishing **VirusTotal CLI** on [Flathub](https://github.com/flathub/flathub/wiki/App-Submission).
- VirusTotal report on vt.exe (0.14.0) HOT 1
- Command similar like `Reanalyze` HOT 3
- Minor CLI typo "public" HOT 1
- Bug: Quota exceeded not handled properly
- Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
- [bug] vt file --help is bugged for subcommands HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vt-cli.