Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some grammar and unify formatting #350

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 58 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,34 @@ Pull requests and other any other contributions would be very much appreciated.

GVM provides an interface to manage Go versions.

Features
========
* Install/Uninstall Go versions with `gvm install [tag]` where tag is "60.3", "go1", "weekly.2011-11-08", or "tip"
* List added/removed files in GOROOT with `gvm diff`
* Manage GOPATHs with `gvm pkgset [create/use/delete] [name]`. Use `--local` as `name` to manage repository under local path (`/path/to/repo/.gvm_local`).
* List latest release tags with `gvm listall`. Use `--all` to list weekly as well.
* Cache a clean copy of the latest Go source for multiple version installs.
* Link project directories into GOPATH

Background
==========
When we started developing in Go mismatched dependencies and API changes plauged our build process and made it extremely difficult to merge with other peoples changes.
## Features

- Install/Uninstall Go versions with `gvm install [tag]` where tag is "60.3", "go1", "weekly.2011-11-08", or "tip".
- List added/removed files in GOROOT with `gvm diff`.
- Manage GOPATHs with `gvm pkgset [create/use/delete] [name]`. Use `--local` as `name` to manage repository under local path (`/path/to/repo/.gvm_local`).
- List latest release tags with `gvm listall`. Use `--all` to list weekly as well.
- Cache a clean copy of the latest Go source for multiple version installs.
- Link project directories into GOPATH.

## Background

When we started developing in Go mismatched dependencies and API changes plagued our build process and made it extremely difficult to merge with other peoples changes.

After nuking my entire GOROOT several times and rebuilding I decided to come up with a tool to oversee the process. It eventually evolved into what gvm is today.

Installing
==========
## Installing

To install:

bash < <(curl -s -S -L https://github.com/moovweb/gvm/master/binscripts/gvm-installer)

Or if you are using zsh just change `bash` with `zsh`

Installing Go
=============
### Installing Go

gvm install go1.4
gvm use go1.4 [--default]

Once this is done Go will be in the path and ready to use. $GOROOT and $GOPATH are set automatically.

Additional options can be specified when installing Go:
Expand All @@ -50,21 +50,20 @@ Additional options can be specified when installing Go:
-B, --binary Only install from binary.
--prefer-binary Attempt a binary install, falling back to source.
-h, --help Display this message.

### A Note on Compiling Go 1.5+

Go 1.5+ removed the C compilers from the toolchain and [replaced][compiler_note] them with one written in Go. Obviously, this creates a bootstrapping problem if you don't already have a working Go install. In order to compile Go 1.5+, make sure Go 1.4 is installed first.

```
gvm install go1.4 -B
gvm use go1.4
export GOROOT_BOOTSTRAP=$GOROOT
gvm install go1.5
```
gvm install go1.4 -B
gvm use go1.4
export GOROOT_BOOTSTRAP=\$GOROOT
gvm install go1.5

[compiler_note]: https://docs.google.com/document/d/1OaatvGhEAq7VseQ9kkavxKNAfepWy2yhPUBs96FGV28/edit

List Go Versions
================
## List Go Versions

To list all installed Go versions (The current version is prefixed with "=>"):

gvm list
Expand All @@ -73,34 +72,30 @@ To list all Go versions available for download:

gvm listall

Uninstalling
============
## Uninstalling

To completely remove gvm and all installed Go versions and packages:

gvm implode

If that doesn't work see the troubleshooting steps at the bottom of this page.

Mac OS X Requirements
====================
* Install Mercurial from https://www.mercurial-scm.org/downloads
* Install Xcode Command Line Tools from the App Store.
## Mac OS X Requirements

- Install Mercurial from https://www.mercurial-scm.org/downloads
- Install Xcode Command Line Tools from the App Store.

```
xcode-select --install
brew update
brew install mercurial
```
xcode-select --install
brew update
brew install mercurial

Linux Requirements
==================
## Linux Requirements

### Debian/Ubuntu

Debian/Ubuntu
==================
sudo apt-get install curl git mercurial make binutils bison gcc build-essential

Redhat/Centos
==================
### Redhat/Centos

sudo yum install curl
sudo yum install git
Expand All @@ -109,45 +104,44 @@ Redhat/Centos
sudo yum install gcc
sudo yum install glibc-devel

* Install Mercurial from http://pkgs.repoforge.org/mercurial/
- Install Mercurial from http://pkgs.repoforge.org/mercurial/

FreeBSD Requirements
====================
### FreeBSD Requirements

sudo pkg_add -r bash
sudo pkg_add -r git
sudo pkg_add -r mercurial

Vendoring Native Code and Dependencies
==================================================
## Vendoring Native Code and Dependencies

GVM supports vendoring package set-specific native code and related
dependencies, which is useful if you need to qualify a new configuration
or version of one of these dependencies against a last-known-good version
in an isolated manner. Such behavior is critical to maintaining good release
in an isolated manner. Such behavior is critical to maintaining good release
engineering and production environment hygiene.

As a convenience matter, GVM will furnish the following environment variables to
aid in this manner if you want to decouple your work from what the operating
system provides:

1. ``${GVM_OVERLAY_PREFIX}`` functions in a manner akin to a root directory
hierarchy suitable for auto{conf,make,tools} where it could be passed in
to ``./configure --prefix=${GVM_OVERLAY_PREFIX}`` and not conflict with any
existing operating system artifacts and hermetically be used by your
workspace. This is suitable to use with ``C{PP,XX}FLAGS and LDFLAGS``, but you will have
to manage these yourself, since each tool that uses them is different.
1. `${GVM_OVERLAY_PREFIX}` functions in a manner akin to a root directory
hierarchy suitable for auto{conf,make,tools} where it could be passed in
to `./configure --prefix=${GVM_OVERLAY_PREFIX}` and not conflict with any
existing operating system artifacts and hermetically be used by your
workspace. This is suitable to use with `C{PP,XX}FLAGS and LDFLAGS`, but you will have
to manage these yourself, since each tool that uses them is different.

2. ``${PATH}`` includes ``${GVM_OVERLAY_PREFIX}/bin`` so that any tools you
manually install will reside there, available for you.
2. `${PATH}` includes `${GVM_OVERLAY_PREFIX}/bin` so that any tools you
manually install will reside there, available for you.

3. ``${LD_LIBRARY_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib`` so that any
runtime library searching can be fulfilled there on FreeBSD and Linux.
3. `${LD_LIBRARY_PATH}` includes `${GVM_OVERLAY_PREFIX}/lib` so that any
runtime library searching can be fulfilled there on FreeBSD and Linux.

4. ``${DYLD_LIBRARY_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib`` so that any
runtime library searching can be fulfilled there on Mac OS X.
4. `${DYLD_LIBRARY_PATH}` includes `${GVM_OVERLAY_PREFIX}/lib` so that any
runtime library searching can be fulfilled there on Mac OS X.

5. ``${PKG_CONFIG_PATH}`` includes ``${GVM_OVERLAY_PREFIX}/lib/pkgconfig`` so
that ``pkg-config`` can automatically resolve any vendored dependencies.
5. `${PKG_CONFIG_PATH}` includes `${GVM_OVERLAY_PREFIX}/lib/pkgconfig` so
that `pkg-config` can automatically resolve any vendored dependencies.

Recipe for success:

Expand All @@ -165,8 +159,8 @@ Recipe for success:

See examples/native for a working example.

Troubleshooting
===============
## Troubleshooting

Sometimes especially during upgrades the state of gvm's files can get mixed up. This is mostly true for upgrade from older version than 0.0.8. Changes are slowing down and a LTR is imminent. But for now `rm -rf ~/.gvm` will always remove gvm. Stay tuned!

[![Gitter](https://badges.gitter.im/GoVesionManager/community.svg)](https://gitter.im/GoVesionManager/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)