kevincobain2000 / gobrew

Go version manager, written in Go. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.
https://medium.com/web-developer/go-version-manager-gobrew-c8750157dfe6
MIT License
364 stars 24 forks source link

Current version not starred #118

Closed agurinov closed 12 months ago

agurinov commented 1 year ago

Hi there! In case of short version current version is not starred.

Repro:

[gura@MBA13:/Users/gura] $ curl --location --fail --silent --create-dirs --output /Users/gura/bin/gobrew https://github.com/kevincobain2000/gobrew/releases/download/v1.8.7/gobrew-darwin-arm64
[gura@MBA13:/Users/gura] $ chmod 500 /Users/gura/bin/gobrew

[gura@MBA13:/Users/gura] $ type gobrew
gobrew is hashed (/Users/gura/bin/gobrew)

[gura@MBA13:/Users/gura] $ gobrew ls
1.18.10
1.19.12
1.20.7
1.21

current: 1.21.0

Expected: 1.21 starred as current

This is just cosmetic issue. It doesn't block any work. Cheers!

kevincobain2000 commented 1 year ago

This will only happen for 1.21 Due to semantic versioning. Just wait for 1.21.1 to release and it will add asterisks as usual

juev commented 1 year ago

Interesting, I think it's worth reviewing the asterisk setting algorithm for new versions. I'll think about it.

kevincobain2000 commented 12 months ago

Cool

╭─pulkit.kathuria@JP-GCJKVGQK0G^M ~/git/gobrew ‹master›
╰─$ gobrew ls
1.17
1.18
1.18.6
1.18.10
1.19
1.19.8
1.20
1.20.1
1.20.3
1.20.4
1.20.5
1.20.7
1.21.0*
1.21rc1
1.21rc3

current: 1.21.0

╭─pulkit.kathuria@JP-GCJKVGQK0G^M ~/git/gobrew ‹master›
╰─$ gobrew use latest                                                                                                                                                          127 ↵
==> [Info] Fetching remote versions

==> [Info] Downloading version: 1.21.1
==> [Info] Downloading from: https://go.dev/dl/go1.21.1.darwin-arm64.tar.gz
==> [Info] Downloading to: /Users/pulkit.kathuria/.gobrew/downloads
Downloading 100% |████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (62/62 MB, 7.5 MB/s)
==> [Info] Extracting from: /Users/pulkit.kathuria/.gobrew/downloads/go1.21.1.darwin-arm64.tar.gz
==> [Info] Extracting to: /Users/pulkit.kathuria/.gobrew/versions/1.21.1
[Success] Extract to /Users/pulkit.kathuria/.gobrew/versions/1.21.1
==> [Success] Downloaded version: 1.21.1
==> [Info] Fetching remote versions

==> [Info] Changing go version to: 1.21.1
==> [Success] Changed go version to: 1.21.1
╭─pulkit.kathuria@JP-GCJKVGQK0G^M ~/git/gobrew ‹master›
╰─$ gobrew ls
1.17
1.18
1.18.6
1.18.10
1.19
1.19.8
1.20
1.20.1
1.20.3
1.20.4
1.20.5
1.20.7
1.21.0
1.21.1*
1.21rc1
1.21rc3