{"id":13495525,"url":"https://github.com/travis-ci/gimme","last_synced_at":"2025-05-16T02:08:26.918Z","repository":{"id":25757116,"uuid":"29195137","full_name":"travis-ci/gimme","owner":"travis-ci","description":"Install go, yay!","archived":false,"fork":false,"pushed_at":"2024-09-06T10:37:22.000Z","size":316,"stargazers_count":708,"open_issues_count":36,"forks_count":75,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-04-13T12:48:52.001Z","etag":null,"topics":["golang","installer","yay"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travis-ci.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-01-13T15:03:34.000Z","updated_at":"2025-04-07T03:50:37.000Z","dependencies_parsed_at":"2022-08-24T14:13:39.144Z","dependency_job_id":"23b06ad6-a21e-49ec-afaa-99de573b2eb7","html_url":"https://github.com/travis-ci/gimme","commit_stats":{"total_commits":259,"total_committers":37,"mean_commits":7.0,"dds":0.5752895752895753,"last_synced_commit":"3f3a9dc6a16f59af098c2965ecc60c78ce9c7e9f"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgimme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgimme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgimme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travis-ci%2Fgimme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travis-ci","download_url":"https://codeload.github.com/travis-ci/gimme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453655,"owners_count":22073617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","installer","yay"],"created_at":"2024-07-31T19:01:35.576Z","updated_at":"2025-05-16T02:08:26.871Z","avatar_url":"https://github.com/travis-ci.png","language":"Shell","funding_links":[],"categories":["Shell","HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# gimme [![Build Status](https://travis-ci.com/travis-ci/gimme.svg?branch=master)](https://travis-ci.com/travis-ci/gimme)\n\nInstall go, yay!\n\n`gimme` is a shell script that knows how to install [go](https://golang.org).  Fancy! :tada:\n\n## Installation \u0026 usage\n\nInstall from github:\n\n``` bash\n# assumes ~/bin exists and is in $PATH, so adjust accordingly!\n\ncurl -sL -o ~/bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme\nchmod +x ~/bin/gimme\n```\n\n[Homebrew](http://brew.sh) (OS X):\n\n```bash\nbrew install gimme\n```\n\n[Arch AUR](https://aur.archlinux.org/) (Arch Linux), substituting `yaourt` with\nhowever you prefer to install from AUR:\n\n``` bash\n# latest released version\nyaourt -S gimme\n\n# current git HEAD revision\nyaourt -S gimme-git\n```\n\nThen check the help text a la:\n\n``` bash\ngimme -h\n\n# or\n\ngimme --help\n\n# or\n\ngimme help\n\n# or\n\ngimme wat\n```\n\nTo install and use version 1.4, for example:\n``` bash\neval \"$(GIMME_GO_VERSION=1.4 gimme)\"\n\n# or:\n\neval \"$(gimme 1.4)\"\n\n# or if you can't stand the thought of using `eval`:\n\ngimme 1.4\nsource ~/.gimme/envs/go1.4.env\n```\n\nOr run without installing gimme:\n\n``` bash\neval \"$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=1.4 bash)\"\n```\n\nTo install and use the current stable release of Go:\n\n``` bash\ngimme stable\n```\n\nTo install the previous minor release of Go:\n\n``` bash\ngimme oldstable\n```\n\nOr to install and use the development version (master branch) of Go:\n\n``` bash\ngimme master\n```\n\nTo list installed versions of Go:\n\n``` bash\ngimme -l\n\n# or\n\ngimme --list\n\n# or\n\ngimme list\n```\n\nTo force re-installation of an existing Go version:\n``` bash\ngimme --force 1.4.1\n\n# or\n\ngimme -f 1.4.1\n\n# or even\n\ngimme force 1.4.1\n```\n\nTo get the version of gimme:\n``` bash\ngimme -V\n\n# or\n\ngimme --version\n\n# or even\n\ngimme version\n```\n\n### `.travis.yml`\n\nThe 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:\n\n```yaml\nlanguage: go\n\nenv:\n    - GIMME_OS=linux GIMME_ARCH=amd64\n    - GIMME_OS=darwin GIMME_ARCH=amd64\n    - GIMME_OS=windows GIMME_ARCH=amd64\n\ninstall:\n    - go get -d -v ./...\n\nscript:\n    - go build -v ./...\n```\n\n## Available Versions\n\n### Policy of Gimme\n\nGimme only supports downloading versions which the Go developers make\navailable.  If a version of Go is withdrawn, then Gimme has no logic\nto go look elsewhere for that version.  Thus as the Go Maintainers withdraw\nold releases, they'll stop being available for Gimme to fetch.\n\nBecause Gimme caches builds, a testing framework which preserves that cache\nmight still have older releases available, leading to sporadic failures.  The\nonly fix is to switch to only requesting currently available versions of Go.\n\nThe environment variable `$GIMME_DOWNLOAD_BASE` can be used to point Gimme\nat another location, so if you need to keep working with older Go releases,\nthen you can maintain your own software artifact mirror which preserves those\nversions and point Gimme at that instead.\n\n### Asking Gimme about Available Versions\n\nInvoke `gimme -k` or `gimme --known` to have Gimme report the versions which\ncan be installed; invoking `gimme stable` installs the version which the Go\nMaintainers have declared to be stable, and `gimme oldstable` installs the last\nstable release one minor version before the current stable. Both of these\ninvolve making network requests to retrieve this information, although the\n`--known` output is cached.  (Use `--force-known-update` to ignore the cache).\n\nThe `stable` request retrieves \u003chttps://golang.org/VERSION?m=text\u003e and reports\nthat. The `oldstable` request does the same and downgrades it by one minor\nversion.\n\nThe `known` request retrieves \u003chttps://golang.org/dl\u003e and parses the page to\nfind releases.  This is not the same as the location where the images are\nretrieved from, thus it's possible for `known` to know about more or fewer\nversions than are actually available.  We proceed on the basis that the\ndocumented releases are suitable and undocumented releases no longer are.\n\nThis `known` list also includes any versions locally known.\n\n### Asking Gimme what a version is\n\nGimme now supports the concept of `.x`, as a version suffix; eg, `1.10.x`\nmight be `1.10` before the release of `1.10.1` but become `1.10.1` once that's\navailable.\n\nTo make this easier, and reduce duplicate invocations, Gimme now supports a\n\"query\" which, instead of producing normal output, just prints the resolution\nof a version specifier.  This is the `--resolve` option.  It handles the `.x`\nsuffix, the `stable` string, and the `oldstable` string; all other inputs are\npassed through unchanged, although unknown names will be accompanied by an\nerror message and an exit code of 2.  A valid version identifier, even if not\ncurrently downloadable from upstream, will resolve successfully.  \"Can resolve\"\nis not \"exists\".\n\nThus given a list of versions to invoke against, tooling might do a first pass\nto use `--resolve` on each and de-duplicate, so that if an alias and a\nhard-coded version map to the same version, then only one invocation needs to\nhappen.\n\nGimme only supports `.x` at the end of a version specifier.  \nThe `--resolve` option must be given a version on the command-line afterwards,\nnot by any other means.  \nThe `--resolve` option and mechanism ignores any installed versions and relies\nsolely upon upstream-exposed lists of available versions and resolvable tags.  \nA git tag named ending `.x` will never be found.  \nUse of `.x` will not find release candidates, alphas, betas or other\nnon-release versions: it's only for finding the last stable release.  \nUse of `${GIMME_TYPE}` to override `auto` and prevent `git` will affect\n`--resolve` by inhibiting use of git tags as valid names.  This is a feature.\n\nNote that because Gimme supports version identifiers which are git tags,\n`--resolve` defaults to handling this too.  This means that `--resolve` can be\nheavy-weight: without the Go repo cloned, first the entire Go repo must be\ncloned.  We default to \"correct\".  To avoid this, export `GIMME_TYPE=binary`\nand disable the git resolution mechanism.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-ci%2Fgimme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravis-ci%2Fgimme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravis-ci%2Fgimme/lists"}