diff --git a/CHANGELOG.md b/CHANGELOG.md index 2858edda..c8fc89a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,11 +45,28 @@ Introducing breaking changes under a feature flag can be ok in some cases where ## Changelog +Change line format: + +``` +* ; Ref: +``` + ## Unreleased (master) +## 2.0.0beta8 + +### Added + +* Add golang installations of 1.12.2, 1.12.3, 1.11.7 and 1.11.8 ; Ref: https://github.com/syndbg/goenv/pull/73 + +### Fixed + +* Lack of environment variables configuration documentation after https://github.com/syndbg/goenv/pull/70. + Also fixed lack of Contributing guidelines ; Ref https://github.com/syndbg/goenv/pull/74 + ## 2.0.0beta7 -#### Added +### Added * Add golang installations of 1.12.1. and 1.11.6 ; Ref: https://github.com/syndbg/goenv/pull/71 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..bac36230 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,59 @@ +# Contributing + +The goenv source code is [hosted on GitHub](https://github.com/syndbg/goenv). +It's clean, modular, and easy to understand, even if you're not a shell hacker. (I hope) + +Tests are executed using [Bats](https://github.com/bats-core/bats-core). + +Please feel free to submit pull requests and file bugs on the [issue tracker](https://github.com/syndbg/goenv/issues). + +## Prerequisites + +* Linux with any (or more than 1) of `zsh`, `bash`, `zsh`. + +## Common commands + +### Running the tests for both `goenv` and `goenv-go-build` + +```shell +> make test +``` + +### Running the tests only for `goenv` + +```shell +> make test-goenv +``` + +### Running the tests only for `goenv-go-build` + +```shell +> make test-goenv-go-build +``` + +### Others + +Check the [Makefile](./Makefile) + +## Workflows + +### Submitting an issue + +1. Check existing issues and verify that your issue is not already submitted. + If it is, it's highly recommended to add to that issue with your reports. +2. Open issue +3. Be as detailed as possible - Linux distribution, shell, what did you do, +what did you expect to happen, what actually happened. + +### Submitting a PR + +1. Find an existing issue to work on or follow `Submitting an issue` to create one + that you're also going to fix. + Make sure to notify that you're working on a fix for the issue you picked. +1. Branch out from latest `master`. +1. Code, add, commit and push your changes in your branch. +1. Make sure that tests (or let the CI do the heavy work for you). +1. Submit a PR. +1. Make sure to clarify if the PR is ready for review or work-in-progress. + A simple `[WIP]` (in any form) is a good indicator whether the PR is still being actively developed. +1. Collaborate with the codeowners/reviewers to merge this in `master`. diff --git a/ENVIRONMENT_VARIABLES.md b/ENVIRONMENT_VARIABLES.md new file mode 100644 index 00000000..cb6858f1 --- /dev/null +++ b/ENVIRONMENT_VARIABLES.md @@ -0,0 +1,14 @@ +## Environment variables + +You can configure how `goenv` operates with the following settings: + +name | default | description +-----|---------|------------ +`GOENV_VERSION` | | Specifies the Go version to be used.
Also see `goenv help shell`. +`GOENV_ROOT` | `~/.goenv` | Defines the directory under which Go versions and shims reside.
Current value shown by `goenv root`. +`GOENV_DEBUG` | | Outputs debug information.
Also as: `goenv --debug ` +`GOENV_HOOK_PATH` | | Colon-separated list of paths searched for goenv hooks. +`GOENV_DIR` | `$PWD` | Directory to start searching for `.go-version` files. +`GOENV_DISABLE_GOROOT` | `false` | Disables management of `GOROOT`.
Set this to `true` if you want to use a `GOROOT` that you export. +`GOENV_DISABLE_GOPATH` | `false` | Disables management of `GOPATH`.
Set this to `true` if you want to use a `GOPATH` that you export. It's recommend that you use this (as set to `false`) to avoid mixing multiple versions of golang packages at `GOPATH` when using different versions of golang. See https://github.com/syndbg/goenv/issues/72#issuecomment-478011438 +`GOENV_GOPATH_PREFIX` | `$HOME/go` | `GOPATH` prefix that's exported when `GOENV_DISABLE_GOPATH` is not `true`.
E.g in practice it can be `$HOME/go/1.12.0` if you currently use `1.12.0` version of go. diff --git a/README.md b/README.md index a80ee7b7..8ffcfe12 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,8 @@ This project was cloned from [pyenv](https://github.com/yyuu/pyenv) and modified * https://github.com/pwoolcoc/goenv depends on Python, * https://github.com/crsmithdev/goenv depends on Go, -* https://github.com/moovweb/gvm is a different approach of the problem that's modeled after `nvm`. `goenv` is more simplified. +* https://github.com/moovweb/gvm is a different approach to the problem that's modeled after `nvm`. + `goenv` is more simplified. ---- @@ -30,34 +31,7 @@ This project was cloned from [pyenv](https://github.com/yyuu/pyenv) and modified * **[How It Works](./HOW_IT_WORKS.md)** * **[Installation](./INSTALL.md)** * **[Command Reference](./COMMANDS.md)** -* **[Environment variables](#environment-variables)** -* **[Development](#development)** +* **[Environment variables](./ENVIRONMENT_VARIABLES.md)** +* **[Contributing](./CONTRIBUTING.md)** +* **[Code-of-Conduct](./CODE_OF_CONDUCT.md)** ----- - -## Environment variables - -You can affect how goenv operates with the following settings: - -name | default | description ------|---------|------------ -`GOENV_VERSION` | | Specifies the Go version to be used.
Also see `goenv help shell`. -`GOENV_ROOT` | `~/.goenv` | Defines the directory under which Go versions and shims reside.
Current value shown by `goenv root`. -`GOENV_DEBUG` | | Outputs debug information.
Also as: `goenv --debug ` -`GOENV_HOOK_PATH` | | Colon-separated list of paths searched for goenv hooks. -`GOENV_DIR` | `$PWD` | Directory to start searching for `.go-version` files. - -## Development - -The goenv source code is [hosted on -GitHub](https://github.com/syndbg/goenv). It's clean, modular, -and easy to understand, even if you're not a shell hacker. (I hope) - -Tests are executed using [Bats](https://github.com/bats-core/bats-core): - -``` -$ make test -``` - -Please feel free to submit pull requests and file bugs on the [issue -tracker](https://github.com/syndbg/goenv/issues). diff --git a/libexec/goenv---version b/libexec/goenv---version index 5777135b..8d120cf4 100755 --- a/libexec/goenv---version +++ b/libexec/goenv---version @@ -6,6 +6,6 @@ set -e [ -n "$GOENV_DEBUG" ] && set -x -version="2.0.0beta7" +version="2.0.0beta8" echo "goenv ${version}" diff --git a/test/goenv--version.bats b/test/goenv--version.bats index b40eef4a..9cd062f4 100644 --- a/test/goenv--version.bats +++ b/test/goenv--version.bats @@ -2,7 +2,7 @@ load test_helper -expected_version="goenv 2.0.0beta7" +expected_version="goenv 2.0.0beta8" @test "default version is 'version' variable" { assert [ ! -e "$GOENV_ROOT" ]