Giter Site home page Giter Site logo

kevincobain2000 / gobrew Goto Github PK

View Code? Open in Web Editor NEW
345.0 8.0 24.0 395 KB

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.

Home Page: https://medium.com/web-developer/go-version-manager-gobrew-c8750157dfe6

License: MIT License

Shell 3.57% Go 83.24% PowerShell 13.19%
golang go golang-tools goenv env golang-cli golang-package install management

gobrew's People

Contributors

alexdashkov avatar beppler avatar dcarbone avatar dhupee avatar futurist avatar gedw99 avatar juev avatar kevincobain2000 avatar lincolnthalles avatar vunhatchuong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gobrew's Issues

Strange output

Hello,

Today I tried to update go version. And I see a lot empty lines.

❯ gobrew use latest
[Info]: Fetching remote versions




















	[Info] Downloading version: 1.19.4
[Info] Downloading from: https://go.dev/dl/go1.19.4.darwin-arm64.tar.gz
[Info] Downloading to: /Users/deevsyukov/.gobrew/downloads
Downloading 100% |████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (140/140 MB, 27.660 MB/s)
[Info] Extracting from: /Users/deevsyukov/.gobrew/downloads/go1.19.4.darwin-arm64.tar.gz
[Info] Extracting to: /Users/deevsyukov/.gobrew/versions/1.19.4
[Success] Untar to /Users/deevsyukov/.gobrew/versions/1.19.4
[Success] Downloaded version: 1.19.4
[Info]: Fetching remote versions




















	[Info] Changing go version to: 1.19.4
[Success] Changed go version to: 1.19.4

We need to investigate it. It not first time.

[feature request] command completion

Hi.

If possible, it would be useful to allow command completion to gobrew. This feature is present in many environment managers. Just as an example, by typing gobrew in, it would auto complete to gobrew install <cursor-here> by hit in TAB, and another hit in TAB would list the available versions.

Feature request: auto set GO version when changing directories

Environment managers from other toolchains, like pyenv for Python or SDKMAN for Java, support automatically changing the version of their respective runtimes based on a simple plain-text config file in the root folder of a project workspace (ie: .pyenv for Python, .skdmanrc for Java). It would be nice if gobrew supported something similar.

I think the way these other tools work is, they inject hooks / shims into the shell environment so that when a user performs a cd operation the tool will look in the target folder it is changing to and locates a file with a specific name. Then it parses the contents of that file, and performs the appropriate environment-switch operation / command to automatically set the runtime version to the value stored in the text file.

Suggestion
You could set up gobrew to with a similar shim, so that if a file named something like ".gobrew" exists in the folder the user is changing to, then it could parse the contents of that file and see if a GO runtime version is installed that matches the value stored in the file. If so, then it could trigger the same logic as is done by running the "gobrew use " command, substituting the value from the file for the version number.

The tool would also need to be smart enough to save the previously used GO version and restore that when the user changes out of that directory, so that the global state is restored.

In addition, the tool would need to be smart enough to detect when the user changes into a subdirectory where one of the parent dirs contains the ".gobrew" file, so that the environment doesn't switch back when the user is navigating subfolders in the same workspace / repository.

There may be one additional edge case here to consider. Unlike the way pyenv and sdkman work, I think that changing runtime environments using gobrew affects the global system, so if a new terminal session is open while navigating the file system that new terminal session would inherit the same GO version as the previously active session. Similarly, if someone were to change directories into a GO project workspace and then subsequently terminate their terminal session, any future terminal sessions that open would likely use the same GO version from that workspace rather than the default global version. So some additional functionality may need to be added to gobrew to distinguish between "temporary" GO versions, and the default / permanent one.

Registry Path needs to be updated to use correct path.

image

Issue is current path registryPath of https://golang.org/dl/ does not finish downloading as it fails due to incorrect path to the install package. Path needs to be updated to use https://go.dev/dl/ which is the updated path for downloading a version.

Does not install the correct windows package.

What is the best value for $GOPATH

Hello, I'm new to go so please excuse me if it is a noob question.

I've installed go via gobrew, I like it for its simplicity over other go version managers.
When I'm trying to use vsCode, it asks me to install gopls (go language server) for it to run via the command go install golang.org/x/tools/gopls@latest, which has installed it in $HOME/go and the binary is located in $HOME/go/bin/gopls which is not on the $PATH. According to go install manual (go help install):

Executables are installed in the directory named by the GOBIN environment
variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH
environment variable is not set. Executables in $GOROOT
are installed in $GOROOT/bin or $GOTOOLDIR instead of $GOBIN.

Since $GOPATH is not defined, it has installed the executable in $HOME/go/bin. I think go version manager should manage this aspect as well. Is this something that is planned? and where would you suggest pointing $GOPATH?

Cannot check gobrew version on upgrade

After latest release we cannot check latest version of gobrew, and upgrade always run.

Because getGithubTags function create request only to new json-file.

Allow specifying arch - especially for darwin

Having functionality to specify arch would be great to have. Sometimes projects might be dependent on x86_64 binaries
Something like -

$ gobrew install 1.19@darwin-amd64
[Info] Downloading version: 1.19@darwin-amd64
[Info] Downloading from: https://go.dev/dl/[email protected] # FAIL 
[Info]: Downloading version failed: https://go.dev/dl/[email protected] returned status code 404
[Error]: Please check connectivity to url: https://go.dev/dl/[email protected]

bash syntax is incompatible with sh

Steps to reproduce

  1. Install with curl -sLk https://git.io/gobrew | sh -

Expected

Installed successfully

Actual

sh: 7: [[: not found
sh: 9: [[: not found
sh: 11: [[: not found
sh: 13: [[: not found
Installed successfully

Possible fix

[[, ]] and == are bash specific and not compatible with sh.
This can be fixed by specifying bash in the shebang #!/bin/bash but that would reduce portability.
Some POSIX compatible command alternatives are:

Bash POSIX
[[ and ]] [ and ]
== =
$OSTYPE uname -o

Bash regex:

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
  GOBREW_ARCH_BIN="gobrew-linux-64"

POSIX case statement with glob patterns:

case $(uname -o) in
  GNU/Linux*)
    GOBREW_ARCH_BIN='gobrew-linux-64';;

Also consider invoking sh like this: sh -c "$(curl -fsSL https://git.io/gobrew)"

ls-remote lists versions lexicographically and duplicates the list

Hey pretty cool project. Wanted to contribute by nitpicking a little bit 😄

image

As you can see here ls-remote result is duplicated and the version numbers are listed lexicographically. Ordering of the patch releases is not important but minor releases should be ordered according the numerical/semantic/release order.

Best path for GOROOT

Hi sorry, there I'm a go noob. I'm installed go using gobrew and my IDE is complaining because I don't have GOROOT set. What should I set it to with this install method? Maybe some info on this could be added to the docs?

fix: cannot compare versions during upgrade

We tried to compare versions gobrew as:

	if currentVersion == gb.getLatestVersion() {
		utils.Infoln("[INFO] your version is already newest")
		return
	}

but currentVersion use format as 1.6.5, not v1.6.5. Comparing was failed and we always upgrading gobrew.

We need fix this comparing.

Feedback

Sorry if this is not the best way to provide feedback.

I've just installed this and its fantastic!

Works perfectly and fast and is extremely useful.

Thank you!

bug: index out of range

https://github.com/kevincobain2000/gobrew/runs/7720193596
https://github.com/kevincobain2000/gobrew/runs/7720193909

Run gobrew use dev-latest
[Info]: Fetching remote versions
panic: runtime error: index out of range [-1]

goroutine 1 [running]:
github.com/kevincobain2000/gobrew.(*GoBrew).judgeVersion(0xc000020125?, {0x7ffeefbfecbb, 0xa})
	/home/runner/work/gobrew/gobrew/gobrew.go:383 +0x7b4
github.com/kevincobain2000/gobrew.(*GoBrew).Install(0xc00010fef0, {0x7ffeefbfecbb?, 0xc000020318?})
	/home/runner/work/gobrew/gobrew/gobrew.go:317 +0x98
main.main()
	/home/runner/work/gobrew/gobrew/cmd/gobrew/main.go:60 +0xda
Error:  Cannot unmarshal data: json: cannot unmarshal object into Go value of type []gobrew.Tag
Error: Process completed with exit code 2.

Unable to install on raspberry

I'm unable to install gobrew on raspberry pi:

curl -sLk https://git.io/gobrew | sh -
Installing gobrew...

Installed successfully to: /root/.gobrew/bin/gobrew

sh: 49: /root/.gobrew/bin/gobrew: Exec format error

Please add PATH below to your ~/.bashrc manually

export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"

uname -m
armv7l

It would be cool if this architecture was supported.
Alterntive a better matching in the bash script and an appropriate error message.

gobrew ls-remote lists package x.x.0 versions wrongly

Just wanted to testdrive the new go 1.18 this morning and stumbled across a little bug in gobrew: the first "minor" versions include the .0 suffix. That's not how they are listed on https://go.dev/dl/ however. There the "patch" version is omitted for the .0 releases.

gobrew install 1.18.0
[Info] Downloading version: 1.18.0
[Info] Downloading from: https://golang.org/dl/go1.18.0.darwin-arm64.tar.gz
[Error]: Response status code: 404
[Info]: Please wait for the file to download.
[Success] Untar to /Users/holger/.gobrew/versions/1.18.0
[Info]: Untar failed: exit status 1
[Error]: Please check if version exists from url: https://golang.org/dl/go1.18.0.darwin-arm64.tar.gz

vs

gobrew install 1.18
[Info] Downloading version: 1.18
[Info] Downloading from: https://golang.org/dl/go1.18.darwin-arm64.tar.gz
[Success]: Response status code: 200
[Success] Untar to /Users/holger/.gobrew/versions/1.18
[Success] Downloaded version: 1.18

Don't error out `gobrew list` after first install

Steps to repro:

  1. curl -sLk https://git.io/gobrew | sh -
  2. export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"
  3. gobrew list

Error message:

gobrew list
==> [Error]: List versions failed: open /Users/username/.gobrew/versions: no such file or directory%

This is not at all intuitive on first run. Instead, the error message should point out that no versions have been installed so far.

Specifying an invalid version returns success

[Info] Downloading version: 1.20.8
[Info] Downloading from: https://golang.org/dl/go1.20.8.darwin-arm64.tar.gz
[Info] Downloading to: /Users/lbriggs/.gobrew/downloads
[Info] Downloading file go1.20.8.darwin-arm64.tar.gz from https://golang.org/dl/go1.20.8.darwin-arm64.tar.gz
0%
[Info] Download completed in 2.012692375s[Info] Extracting from: /Users/lbriggs/.gobrew/downloads/go1.20.8.darwin-arm64.tar.gz
[Info] Extracting to: /Users/lbriggs/.gobrew/versions/1.20.8
[Success] Untar to /Users/lbriggs/.gobrew/versions/1.20.8
[Success] Downloaded version: 1.20.8

Obviously there's no 1.20.8 of go, so the download should fail

issue - gobrew not installing go binary

Hi there,

Thanks so much for putting this project together. I'm really excited to use it. I'm currently having an issue where it seems like gobrew will not actually download the binary for any version of go. I've attached a screen recording below. I installed via curl and am using an Ubuntu 20.04 LTS Linux system. I made sure to update my $PATH

Any ideas? Thanks!

simplescreenrecorder-2021-12-08_14.53.27.mp4

Hard to read output in light scheme colors

Description

When the system color scheme is set to light, the output of gobrew is hard to read because it outputs in yellow font color. This is on a M1 Mac, but I think it will be a problem for Linux users as well. See the below screenshot:

Screenshot 2023-05-09 at 09 25 16

Possible solutions

We could try to change the color output based on system color scheme. I haven't researched how to do this in Go, but I hope this is a solved problem across different platforms 🙂

Another solution would be to make the color output configurable.

I'm happy to contribute a PR.

Downloading version failed: file too large

While installing go, getting following error in mocos:

❯ gobrew install 1.16
[Info] Downloading version: 1.16
[Info]: Downloading version failed: write /Users/mayank/.gobrew/downloads/go1.16.darwin-amd64.tar.gz: file too large
[Error]: Please check connectivity to url: https://golang.org/dl/go1.16.darwin-amd64.tar.gz

I can download the version via browser without any issue. Any tips on how to bypass this limit?

A way to adjust the default .gobrew directory with an env variable

It would be great if we could change --using an environment variable-- the default .gobrew directory.

It is placed in $HOME by default, but that's not XDG compliant (I want it to be ~/.local/share/gobrew/ just like what I do with pyenv, volta and vagrant).

With pyenv this is done using PYENV_ROOT environment variable.

Failed to install go 1.21.0

Go 1.21.0 has been released, with the version number being 1.21.0 instead of 1.21. When using gobrew to install the version, it trims the ".0" at the end of the version number. Consequently, accessing https://go.dev/dl/go1.21.darwin-amd64.tar.gz will result in a 404 error since the file does not exist.

image

BTW, gobrew is a really coooooool tool, thank you~

gobrew 1.7.3 under Linux (Ubuntu)

gobrew self-update

Downloads the update and then produces the following error message:
[Error] Cannot open file /home/paul/.gobrew/bin/gobrew: text file busy

Happening on multiple linux machines and in Windows WSL

Can't install go1.14 on macOS

Hi.

I have been trying to install go1.14 to work on a legacy project, but it seems gobrew can't install it in macOS Monterey 12.5.1 (M!).

Please check the go1.19 in this log below, it is from system, but notice gobrew can't switch to go1.14 and remains allowing to install go1.14 two or more times:

~ % gobrew use 1.14
[Info] Downloading version: 1.14
[Info] Downloading from: https://golang.org/dl/go1.14.darwin-arm64.tar.gz
[Info] Downloading to: ~/.gobrew/downloads
Downloading 100% |████████████████████████████████████████████████████████████| (1.4/1.4 kB, 3.331 MB/s)
[Info] Extracting from: ~/.gobrew/downloads/go1.14.darwin-arm64.tar.gz
[Info] Extracting to: ~/.gobrew/versions/1.14
[Success] Untar to ~/.gobrew/versions/1.14
[Success] Downloaded version: 1.14
[Info] Changing go version to: 1.14
[Success] Changed go version to: 1.14

~ % go version
go version go1.19 darwin/arm64

~ % gobrew use 1.14
[Info] Downloading version: 1.14
[Info] Downloading from: https://golang.org/dl/go1.14.darwin-arm64.tar.gz
[Info] Downloading to: ~/.gobrew/downloads
Downloading 100% |████████████████████████████████████████████████████████████| (1.4/1.4 kB, 3.476 MB/s)
[Info] Extracting from: ~/.gobrew/downloads/go1.14.darwin-arm64.tar.gz
[Info] Extracting to: ~/.gobrew/versions/1.14
[Success] Untar to ~/.gobrew/versions/1.14
[Success] Downloaded version: 1.14
[Info] Changing go version to: 1.14
[Success] Changed go version to: 1.14

~ % go version
go version go1.19 darwin/arm64

~ % tree .gobrew
.gobrew
├── current
│   ├── bin -> ~/.gobrew/versions/1.14/go/bin
│   └── go -> ~/.gobrew/versions/1.14/go
└── versions
    └── 1.14
        └── unknown-pack

Uninstall gobrew

I think the steps on how to uninstall gobrew from your system is missing in the README.

GOROOT will not be changed if official go installed first

If official go version installed first, and want use gobrew to change to another version, then the GOROOT path won't changed.

Step to reproduce:

  1. official go installed(ex:1.17) to /usr/local/go
  2. install gobrew, then gobrew use 1.18
  3. go env | grep GOROOT can see the GOROOT won't changed.

Suggestion:
When encountered this case, maybe gobrew can give user a notice to set GOROOT manually?

zsh: killed gobrew after upgrade

 10:28:48  ❯ gobrew self-update
Downloading 100% |████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (5.6/5.6 MB, 16.459 MB/s)
Upgrade successful

 10:28:56  ❯ gobrew
zsh: killed     gobrew

after self-update gobrew do not work.

[bug] install via shell/go throws errors

~ ❯ curl -sLk https://git.io/gobrew | sh -                                                                                                                                                                   ✔ 2|0 at 10:49:22
Using gobrew version latest

Installed successfully to: /Users/jorde/.gobrew/bin/gobrew
============================
: command not foundw/bin/gobrew: line 1:
/Users/jorde/.gobrew/bin/gobrew: line 2: html: No such file or directory
/Users/jorde/.gobrew/bin/gobrew: line 3: head: No such file or directory
/Users/jorde/.gobrew/bin/gobrew: line 4: meta: No such file or directory
/Users/jorde/.gobrew/bin/gobrew: line 5: title: No such file or directory
/Users/jorde/.gobrew/bin/gobrew: line 5: middot: command not found
/Users/jorde/.gobrew/bin/gobrew: line 5: /title: No such file or directory
/Users/jorde/.gobrew/bin/gobrew: line 6: meta: No such file or directory
/Users/jorde/.gobrew/bin/gobrew: line 7: style: No such file or directory
/Users/jorde/.gobrew/bin/gobrew: line 8: body: command not found
/Users/jorde/.gobrew/bin/gobrew: line 9: background-color:: command not found
/Users/jorde/.gobrew/bin/gobrew: line 10: syntax error near unexpected token `('
'Users/jorde/.gobrew/bin/gobrew: line 10: `        color: rgba(0, 0, 0, 0.5);
============================

***Please add PATH below to your ~/.bashrc manually***

export PATH="$HOME/.gobrew/current/bin:$HOME/.gobrew/bin:$PATH"

Installation via Go works fine, but installs to the GOBIN path (default being $HOME/go/bin)

Which results in gobrew being unable to run most commands as it expects the $HOME/.gobrew folder to be the correct directory.

First time diving into Go, so maybe I'm missing something that's obvious to seasoned Go devs.

`gobrew self-update` may not work on M1/M2 macs

Since it replaces the binary, in order to install the new binary the old binary needs to be deleted completely.

╭─pulkit.kathuria@JP- ~/git/gobrew ‹master›
╰─$ gobrew self-update
Downloading 100% |███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| (5.6/5.6 MB, 9.119 MB/s)
Upgrade successful
╭─pulkit.kathuria@JP- ~/git/gobrew ‹master›
╰─$ gobrew version
[1]    57080 killed     gobrew version

Update test files

When golang will update we have errors in our test files.

We need to use test files without this errors. How? I dont know in this time.

gobrew self-update always updates

Previously when running gobrew self-update the tool would check for updates and if found would update the tool, otherwise it would report no update available and that you are already up to date.

Currently when running the above command the tool always seems to download and report 'Upgrade successful' even though no new version has been posted.

Can you please investigate?

Expected behaviour is to run this command and if an update is available then download and upgrade, otherwise do not download approx 6Mb unnecessarily.

Kind regards

override registryPath from user

When inside restricted networks like inside enterprise, the 'golang.org' may not be accessible, so there's a need to override the registryPath like from env.

Output library

ref: #85

we use fatih/color library for output, but in my terminal I dont see colors. :)
and my opinion, we should simplify our output.

Снимок экрана 2023-01-13 в 10 12 27

For example, switch to zap for our output?

This issue just my opinion and thoughts out loud.

We can discuss and decide what to do in the future, leave everything as it is, or try something else.

Version not found

$ gobrew ls-remote
[Info]: Fetching remote versions
1       1.0.1  1.0.2  1.0.3  
1.1     1.1.0  1.1.1  1.1.2  
1.2     1.2.0  1.2.1  1.2.2  
1.3     1.3.0  1.3.1  1.3.2  1.3.3  
1.4     1.4.0  1.4.1  1.4.2  1.4.3  
1.5     1.5.0  1.5.1  1.5.2  1.5.3  1.5.4  
1.6     1.6.0  1.6.1  1.6.2  1.6.3  1.6.4  
1.7     1.7.0  1.7.1  1.7.2  1.7.3  1.7.4  1.7.5  1.7.6  
1.8     1.8.0  1.8.1  1.8.2  1.8.3  1.8.4  1.8.5  1.8.6  1.8.7  
1.9     1.9.0  1.9.1  1.9.2  1.9.3  1.9.4  1.9.5  1.9.6  1.9.7  
1.10    1.10.0  1.10.1  1.10.2  1.10.3  1.10.4  1.10.5  1.10.6  1.10.7  1.10.8  
1.11    1.11.0  1.11.1  1.11.2  1.11.3  1.11.4  1.11.5  1.11.6  1.11.7  1.11.8  1.11.9  1.11.10  1.11.11  1.11.12  1.11.13  
1.12    1.12.0  1.12.1  1.12.2  1.12.3  1.12.4  1.12.5  1.12.6  1.12.7  1.12.8  1.12.9  1.12.10  1.12.11  1.12.12  1.12.13  1.12.14  1.12.15  1.12.16  1.12.17  
1.13    1.13.0  1.13.1  1.13.2  1.13.3  1.13.4  1.13.5  1.13.6  1.13.7  1.13.8  1.13.9  1.13.10  1.13.11  1.13.12  1.13.13  1.13.14  1.13.15  
1.14    1.14.0  1.14.1  1.14.2  1.14.3  1.14.4  1.14.5  1.14.6  1.14.7  1.14.8  1.14.9  1.14.10  1.14.11  1.14.12  1.14.13  1.14.14  1.14.15  
1.15    1.15.0  1.15.1  1.15.2  1.15.3  1.15.4  1.15.5  1.15.6  1.15.7  1.15.8  1.15.9  1.15.10  1.15.11  1.15.12  1.15.13  1.15.14  1.15.15  
1.16    1.16.0  1.16.1  1.16.2  1.16.3  1.16.4  1.16.5  1.16.6  1.16.7  
1.17
$ gobrew install 1.16.7
[Info] Downloading version: 1.16.7 
[Success] Untar to /home/miguel/.gobrew/versions/1.16.7
[Info]: Untar failed: exit status 2 
[Error]: Please check if version exists from url: https://golang.org/dl/go1.16.7.linux-amd64.tar.gz

First I need to thank you for such a simple version manager. I could never understand why people wouldn't use golang to build a version manager to itself. Instead, most alternatives use bash scripts for some reason 🤔 .

As the time of writing, the url https://golang.org/dl/go1.16.7.linux-amd64.tar.gz returns 404 but the release does exist in Github. Any reason why not to use Github releases? Cheers!

Binary files on repository

#33

~/Projects/Github
 14:26:40  ❯ git clone [email protected]:kevincobain2000/gobrew.git
Cloning into 'gobrew'...
remote: Enumerating objects: 597, done.
remote: Counting objects: 100% (223/223), done.
remote: Compressing objects: 100% (105/105), done.
remote: Total 597 (delta 109), reused 186 (delta 94), pack-reused 374
Receiving objects: 100% (597/597), 270.40 MiB | 3.64 MiB/s, done.
Resolving deltas: 100% (288/288), done.

~/Projects/Github
 14:28:03  ❯ du -sh gobrew
311M	gobrew

Repository contains binary files for all systems and all versions. In this time it 311M. Its a lot.

We need to move binary files to Github Releases. And provide path for downloads binary files.

Fo example we can download binary file from latest release:

https://github.com/juev/starred/releases/latest/download/starred_0.0.5_Darwin_arm64.tar.gz

We can use shell script with this function for download latest release, for example:
https://gist.github.com/jpillora/5a7da6a297d2b6c33d04

This example contains version in binary file. But we can provide files without it.

Should we use tar for storing binary files? Good question. All operation systems contains tar. And we can use binary files with one name, and many tars with different names. For example, all executable files named as: gobrew, but tar archives as: gobrew-macos-64.tar.gz

We can install manually from release page. Just download latest release, unpack it, move to PATH. But we can provide shell script, which can do it automatically. And we can create homebrew formula for installing gobrew on macOS. We have many options for it.

For example: Hugo, contains many options for installation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.