• Stars
    star
    690
  • Rank 65,522 (Top 2 %)
  • Language
    Shell
  • License
    MIT License
  • Created almost 10 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Install go, yay!

gimme Build Status

Install go, yay!

gimme is a shell script that knows how to install go. Fancy! πŸŽ‰

Installation & usage

Install from github:

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

curl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme
chmod +x ~/bin/gimme

Homebrew (OS X):

brew install gimme

Arch AUR (Arch Linux), substituting yaourt with however you prefer to install from AUR:

# latest released version
yaourt -S gimme

# current git HEAD revision
yaourt -S gimme-git

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 https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)"

To install and use the current stable release of Go:

gimme stable

To install the previous minor release of Go:

gimme oldstable

Or to install and use the development version (master branch) of Go:

gimme master

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

.travis.yml

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

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

install:
    - go get -d -v ./...

script:
    - go build -v ./...

Available Versions

Policy of Gimme

Gimme only supports downloading versions which the Go developers make available. If a version of Go is withdrawn, then Gimme has no logic to go look elsewhere for that version. Thus as the Go Maintainers withdraw old releases, they'll stop being available for Gimme to fetch.

Because Gimme caches builds, a testing framework which preserves that cache might still have older releases available, leading to sporadic failures. The only fix is to switch to only requesting currently available versions of Go.

The environment variable $GIMME_DOWNLOAD_BASE can be used to point Gimme at another location, so if you need to keep working with older Go releases, then you can maintain your own software artifact mirror which preserves those versions and point Gimme at that instead.

Asking Gimme about Available Versions

Invoke gimme -k or gimme --known to have Gimme report the versions which can be installed; invoking gimme stable installs the version which the Go Maintainers have declared to be stable, and gimme oldstable installs the last stable release one minor version before the current stable. Both of these involve making network requests to retrieve this information, although the --known output is cached. (Use --force-known-update to ignore the cache).

The stable request retrieves https://golang.org/VERSION?m=text and reports that. The oldstable request does the same and downgrades it by one minor version.

The known request retrieves https://golang.org/dl and parses the page to find releases. This is not the same as the location where the images are retrieved from, thus it's possible for known to know about more or fewer versions than are actually available. We proceed on the basis that the documented releases are suitable and undocumented releases no longer are.

This known list also includes any versions locally known.

Asking Gimme what a version is

Gimme now supports the concept of .x, as a version suffix; eg, 1.10.x might be 1.10 before the release of 1.10.1 but become 1.10.1 once that's available.

To make this easier, and reduce duplicate invocations, Gimme now supports a "query" which, instead of producing normal output, just prints the resolution of a version specifier. This is the --resolve option. It handles the .x suffix, the stable string, and the oldstable string; all other inputs are passed through unchanged, although unknown names will be accompanied by an error message and an exit code of 2. A valid version identifier, even if not currently downloadable from upstream, will resolve successfully. "Can resolve" is not "exists".

Thus given a list of versions to invoke against, tooling might do a first pass to use --resolve on each and de-duplicate, so that if an alias and a hard-coded version map to the same version, then only one invocation needs to happen.

Gimme only supports .x at the end of a version specifier.
The --resolve option must be given a version on the command-line afterwards, not by any other means.
The --resolve option and mechanism ignores any installed versions and relies solely upon upstream-exposed lists of available versions and resolvable tags.
A git tag named ending .x will never be found.
Use of .x will not find release candidates, alphas, betas or other non-release versions: it's only for finding the last stable release.
Use of ${GIMME_TYPE} to override auto and prevent git will affect --resolve by inhibiting use of git tags as valid names. This is a feature.

Note that because Gimme supports version identifiers which are git tags, --resolve defaults to handling this too. This means that --resolve can be heavy-weight: without the Go repo cloned, first the entire Go repo must be cloned. We default to "correct". To avoid this, export GIMME_TYPE=binary and disable the git resolution mechanism.

More Repositories

1

travis-ci

Free continuous integration platform for GitHub projects.
8,353
star
2

travis.rb

Travis CI Client (CLI and Ruby library)
Ruby
1,583
star
3

dpl

Dpl (dee-pee-ell) is a deploy tool made for continuous deployment.
Ruby
1,284
star
4

travis-cookbooks

Chef cookbook monolithic repo πŸ“– πŸ’£
HTML
663
star
5

travis-build

.travis.yml => build.sh converter
Ruby
653
star
6

travis-web

The Ember web client for Travis CI
JavaScript
611
star
7

docs-travis-ci-com

The Travis CI Documentation
SCSS
570
star
8

travis-api

The Travis CI API
Ruby
295
star
9

worker

Worker runs your Travis CI jobs
Go
274
star
10

travis-core

[DEPRECATED] Models and classes shared by Travis CI api, hub and gatekeeper
Ruby
239
star
11

travis-yaml

parses, normalizes, validates and serializes your .travis.yml
Ruby
170
star
12

travis-ci.github.com

[DEPRECATED] The Travis CI blog & documentation website
CSS
154
star
13

travis-worker

[DEPRECATED] This project is deprecated in favor of travis-ci/worker
Ruby
141
star
14

terraform-config

Terraform bits and bytes
HCL
123
star
15

travis-yml

Travis CI build config processing
Ruby
113
star
16

travis-lint

[DEPRECATED] Use travis-ci/travis-yml instead
Ruby
113
star
17

apt-package-safelist

Safelist of apt packages approved for build environments with restricted sudo
Shell
108
star
18

packer-templates

Templates for Packer!
Ruby
102
star
19

travis-watcher-macosx

[DEPRECATED] A Travis CI client for Mac OS X.
Objective-C
95
star
20

artifacts

Travis CI Artifacts Uploader
Go
87
star
21

travis-boxes

[DEPRECATED] Travis Boxes makes provisioning and configuring Virtual Box machines simple and easy.
Ruby
78
star
22

apt-source-safelist

Safelist of apt sources approved for build environments with restricted sudo
Ruby
78
star
23

gh

Layered GitHub API client
Ruby
68
star
24

travis-hub

Job State Central Command
Ruby
67
star
25

beta-features

The perfect place to leave feedback and comments on newly released Beta Features.
58
star
26

pudding

[DEPRECATED] It's a thing for managing instances!
Go
58
star
27

travis-logs

Processes log updates from the job runner (worker), and streams them to the web client, aggregates them, and archives to S3.
Ruby
56
star
28

travis-crowd

[DEPRECATED] Travis' love campaign (replaced by https://github.com/travis-ci/travis-love-campaign)
Ruby
49
star
29

osx-image-bootstrap

DEPRECATED Bootstrap scripts for Travis CI OS X VMs
Shell
47
star
30

build-stages-demo

Demos for Travis CI build stages
Ruby
46
star
31

travis-listener

Receives and queues service hook notifications from GitHub for processing.
Ruby
44
star
32

travis-rubies

my rubies, let me show you them
Shell
43
star
33

casher

CH CHING
Ruby
42
star
34

moustached-hubot

Moustached ChatOps for your hubot.
CoffeeScript
42
star
35

kubernetes-config

Travis services running on Kubernetes!
Shell
38
star
36

travis-tasks

The Sidekiq based Travis background job processor.
Ruby
37
star
37

php-src-builder

Builds php/php-src with php-build and uploads artifacts to S3
Roff
31
star
38

travis-support

Support classes and extensions used in travis-ci
Ruby
30
star
39

travis-scheduler

Queues jobs to be run by the various workers
Ruby
28
star
40

travis-cli-gh

[DEPRECATED] Travis CLI plugin to interact with GitHub API
Ruby
24
star
41

travis-sso

Implements Travis CI Single Sign-On as a Rack middleware.
Ruby
22
star
42

travis-artifacts

[DEPRECATED] Upload artifacts after running your tests to S3 (Unmaintained. See https://github.com/travis-ci/artifacts)
Ruby
21
star
43

docker-sinatra

[DEMO] Sample project for running a sinatra application on Docker from within a Travis build
Ruby
21
star
44

sso

SSO in go, implemented as an HTTP proxy.
Go
21
star
45

travis-assets

[DEPRECATED] We are using a CDN now
JavaScript
21
star
46

travis-conditions

Boolean language for conditional builds, stages, jobs
Ruby
20
star
47

actions

The best of GitHub Actions!
JavaScript
19
star
48

travis-foundation

Travis Foundation website.
HTML
19
star
49

gcloud-cleanup

Clean That Cloud! ☁️ πŸ›€
Go
19
star
50

travis-ruby-client

Ruby client library for Travis CI API
Ruby
19
star
51

packer-templates-mac

Templates for building images for macOS for Travis with Packer!
Shell
17
star
52

travis-chat

[DEMO] example app demoing travis-sso usage
Ruby
15
star
53

jupiter-brain

Jupiter Brain manages servers
Go
14
star
54

cpython-builder

Clones and builds CPython
Shell
13
star
55

travis.js

[DEPRECATED]
CoffeeScript
12
star
56

travis-deploy

[DEPRECATED] Travis Deploy tool
Ruby
11
star
57

collectd-vsphere

vSphere metrics plugin for collectd
Go
11
star
58

travis-web-log

CoffeeScript
10
star
59

system-info

πŸ’ Gathers and reports system information specific to the travis build environment.
Ruby
10
star
60

worker-operator

A Kubernetes operator for deploying worker
Go
10
star
61

enterprise-installation

Travis CI Enterprise Installation Instructions
10
star
62

job-board

have a job? need a job? no jobs? all the jobs!
Ruby
9
star
63

cloud-brain

It talks to the clouds
Go
9
star
64

travis-weblint

travis-lint meets teh Internet
Ruby
9
star
65

travis-images

[DEPRECATED] Used to created and manage Travis VMs IN THE CLOUD
Ruby
9
star
66

apt-whitelist-checker

Automation of https://github.com/travis-ci/apt-package-whitelist approval process
Shell
9
star
67

cyclist

AWS ASG lifecycle thing πŸŽ‰ 🚴
Go
8
star
68

2fabot

Slack bot that sends reminders to people to enable two-factor authentication.
Go
8
star
69

travis-extension-chrome

[DEPRECATED] Chrome extension that displays build status in the toolbar
8
star
70

travis-cli-pr

[DEPRECATED] This plugin has been deprecated, please use the travis settings command and the GitHub plugin instead. https://github.com/travis-ci/travis-cli-gh
Ruby
8
star
71

unlimited-jce-policy-jdk7

It's JCE Unlimited Strength Jurisdiction Policy Files 7 in a gem!
Ruby
7
star
72

prompt_warn_env

Warn if sensitive env vars are present
Shell
7
star
73

travis-erlang-builder

πŸ“«
Shell
6
star
74

travis-become

Ruby
6
star
75

travis-config

How does one configure πŸ’ƒ
Ruby
6
star
76

travis-migrations

Skeleton app to allow migrations to be run for our infrastructures
Ruby
6
star
77

travis-nightly-builder

API + rake tasks to build "nightly" or on-demand stuff
JavaScript
6
star
78

encrypted-column

Go implementation of encrypted database column bits
Go
6
star
79

travis-cli-settings

[DEPRECATED] No longer in use.
Ruby
5
star
80

travis-styleguide

[DEPRECATED] ✨
CSS
5
star
81

hubot-pudding

Script for interacting with a pudding server
CoffeeScript
5
star
82

travis-redirect

Ruby
5
star
83

veewee-definitions

[DEPRECATED] Veewee definitions we use to build our base boxes
Shell
5
star
84

container-example

[DEMO] An example showing how to use Travis CIs container-based infrastructure
Protocol Buffer
5
star
85

webhook-signature-verifier

A small Sinatra app to verify the webhook payload signature
Ruby
4
star
86

travis-images-specs

[DEPRECATED] tests for Travis build images
Ruby
4
star
87

travis-sidekiqs

Async, baby!
Ruby
4
star
88

cat-party

[DEMO] CodeDeploy Demo
HTML
4
star
89

tfw

The Tiny Floating Whale of infrastructure at Travis CI ✨ 🐳
Shell
4
star
90

travis-caching

[DEPRECATED] A simple caching service with pluggable backends
Ruby
4
star
91

travis_migrate_to_apps

Migrate your GitHub organizations to use the Travis CI GitHub App integration
Ruby
4
star
92

macbot

Slack bot for managing vSphere and other Travis Mac infrastructure things
Go
4
star
93

build-email

[DEPRECATED] The up-to-date HTML for build emails is generated from this template: https://github.com/travis-ci/travis-tasks/blob/master/lib/travis/addons/email/mailer/views/build/finished_email.html.erb
4
star
94

openshift-travis-quickstart

[DEMO] A sample Rack application showing Travis CI and OpenShift integration
Ruby
4
star
95

travis-api-v3

Pulling out our V3 codebase to be a stand alone application.
Ruby
3
star
96

travis-packer-build

πŸ“¦ 🚧
Ruby
3
star
97

travis-logsearch

Pipeline to dump job execution logs into elasticsearch!
Ruby
3
star
98

apt-gpg-keys

List of keys installed by travis-build at run time
3
star
99

build-env-linux

[WIP] New and improved Travis build environments for Linux
3
star
100

travis-encrypt

Encryption support
Ruby
3
star