justjanne / powerline-go

A beautiful and useful low-latency prompt for your shell, written in go
GNU General Public License v3.0
2.73k stars 268 forks source link

git tags for 1.24 release is not semver and cannot go install it #390

Open jchappelow opened 1 year ago

jchappelow commented 1 year ago

Describe the bug

The two latest release tags are v1.23 and v1.24. However, since these are not semver tags, go install can't install them via either @latest or @v1.24. To resolve this, please create a new tag called v1.24.0 at the same commit as v1.24.

To Reproduce

$ go install github.com/justjanne/powerline-go@latest
go: downloading github.com/justjanne/powerline-go v1.22.1
go: downloading github.com/shirou/gopsutil/v3 v3.22.3
go: downloading golang.org/x/text v0.3.4
go: downloading golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27
go: downloading golang.org/x/term v0.0.0-20201117132131-f5c789dd3221
go: downloading github.com/tklauser/go-sysconf v0.3.10
go: downloading github.com/tklauser/numcpus v0.4.0

$ go install github.com/justjanne/powerline-go@v1.24
go: github.com/justjanne/powerline-go@v1.24: no matching versions for query "v1.24"

$ go install github.com/justjanne/powerline-go@v1.24.0
go: github.com/justjanne/powerline-go@v1.24.0: github.com/justjanne/powerline-go@v1.24.0: invalid version: unknown revision v1.24.0

I can only install the version at the v1.24 commit like this:

$ go install -v github.com/justjanne/powerline-go@df3475d6
go: downloading github.com/justjanne/powerline-go v1.22.2-0.20230525090453-df3475d6c9ef
github.com/justjanne/powerline-go/exitcode
golang.org/x/sys/internal/unsafeheader
golang.org/x/text/transform
golang.org/x/sys/unix
github.com/justjanne/powerline-go/powerline
gopkg.in/ini.v1
golang.org/x/text/width
github.com/tklauser/numcpus
github.com/shirou/gopsutil/v3/mem
golang.org/x/term
github.com/tklauser/go-sysconf
github.com/shirou/gopsutil/v3/cpu
github.com/shirou/gopsutil/v3/process
github.com/justjanne/powerline-go

Note that Go's semantic import versioning is calling this v1.22.2-0.20230525090453-df3475d6c9ef

Expected behavior

Either go install github.com/justjanne/powerline-go@latest or go install github.com/justjanne/powerline-go@v1.24.0 should work to install powerline-go for the latest release.

Environment (please complete the following information):

Go 1.21