bwplotka / bingo

Like `go get` but for Go tools! CI Automating versioning of Go binaries in a nested, isolated Go modules.
Apache License 2.0
342 stars 29 forks source link

Parsing of devel Go version fails #131

Closed martin-sucha closed 1 year ago

martin-sucha commented 1 year ago

bingo version output:

v0.7

go version output:

go version devel go1.21-02d8ebda83 Mon Feb 6 22:13:07 2023 +0000 linux/amd64

What happened:

When running a bingo command with a development version of Go, Bingo commands fail. Even simple bingo version prints the following error:

Error: version command failed: parse go version: unexpected go version format

What you expected to happen:

Bingo parses the version.

How to reproduce it (as minimally and precisely as possible):

  1. Compile a development version of Go (e.g. checkout the Go sources, cd src, ./make.bash
  2. Make the dev Go version reachable from PATH
  3. Run bingo version

Anything else we need to know:

There is an additional devel token in the go version output, so parseGoVersion needs to be adjusted.

bwplotka commented 1 year ago

Yup, bug to fix, thanks for proposing fix, commented.