Public | Automated Build

Last pushed: 9 months ago
Short Description
Use different Go versions. By Travis CI
Full Description


Install go, yay!

gimme is a shell script that knows how to install go. Fancy! :tada:

Installation & usage

Install from github:

# assumes ~/bin exists and is in $PATH, so adjust accordingly!

curl -sL -o ~/bin/gimme
chmod +x ~/bin/gimme

Homebrew (OS X):

brew install gimme

Then check the help text a la:

gimme -h

# or

gimme --help

# or

gimme help

# or

gimme wat

To install and use version 1.4, for example:

eval "$(GIMME_GO_VERSION=1.4 gimme)"

# or:

eval "$(gimme 1.4)"

# or if you can't stand the thought of using `eval`:

gimme 1.4
source ~/.gimme/envs/go1.4.env

Or run without installing gimme:

eval "$(curl -sL | GIMME_GO_VERSION=1.4 bash)"

To list installed versions of Go:

gimme -l

# or

gimme --list

# or

gimme list

To force re-installation of an existing Go version:

gimme --force 1.4.1

# or

gimme -f 1.4.1

# or even

gimme force 1.4.1

To get the version of gimme:

gimme -V

# or

gimme --version

# or even

gimme version


The original goal of this project was trivial cross-compilation within Travis. The following is an example .travis.yml file to accomplish this for a normal Go project:

language: go

    - GIMME_OS=linux GIMME_ARCH=amd64
    - GIMME_OS=darwin GIMME_ARCH=amd64
    - GIMME_OS=windows GIMME_ARCH=amd64

    - go get -d -v ./...

    - go build -v ./...
Docker Pull Command
Source Repository

Comments (0)