Thanks for the responses.
I will try a few options and see what fit best.
For a bit of context I’m making a script to check if the entire toolchain
needed to build a project is present on the machine. The script checks for
node/npm, Go, GCC and a few other tools (like go-bindata eg.). The real
On Wed, Aug 09, 2017 at 03:11:48PM +0200, Michael Banzon wrote:
> Is there a way to have a (bash) script check if the version of the Go
> compiler installed is a specific minimum version?
In the light of [1], I think you could combine checking of the presense
of the `go` tool itself with build ta
You might want to follow the discussion in golang.org/issue/21207 which
might be related to this, depending on the reason you need to know the
minimum Go version. `go version` doesn't return the version number on
non-tagged releases so if you're building off of tip, for example, the
output is a bit
Maybe something like this may help you
#!/bin/bash## requirements: bc, awk, tr, cut##_gocurrel="$(go
version|awk '{print $3}'|tr -d "go"|cut -d"."
-f1-2)"_gominrel="1.5"###_key=$(echo "$_gominrel > $_gocurrel" | bc
-l)###if [ "$_key" != "0" ]then
echo "Ops! Current go release is $_gocurrel
Running "go version" at the command line returns a version number. You can
parse that.
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+unsubscr...@goo
Hi,
Is there a way to have a (bash) script check if the version of the Go compiler
installed is a specific minimum version?
--
Michael Banzon
https://michaelbanzon.com/
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from th