From e017ec18e466dffb40b30c19c99b418e6345a033 Mon Sep 17 00:00:00 2001 From: Jess Breckenridge Date: Wed, 3 May 2017 14:25:31 -0600 Subject: [PATCH 1/5] - Initial documentation on contributing to gh-ost. - It is a bit sparse currently, but will give beginners an idea how on to setup the environment and run tests. - A good starting point for further PR's. --- doc/codingghost.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/codingghost.md diff --git a/doc/codingghost.md b/doc/codingghost.md new file mode 100644 index 000000000..9828dac4b --- /dev/null +++ b/doc/codingghost.md @@ -0,0 +1,23 @@ +# Getting started with gh-ost development. + +## Overview + +Getting started with gh-ost development is simple! + +- First clone the repository. +- From inside of the repository run `script/cibuild` +- This will bootstrap the environment if needed, format the code, build the code, and then run the unit test. + +## CI build workflow + +`script/cibuild` performs the following actions: + +- It runs `script/bootstrap` +- `script/bootstrap` run `script/ensure-go-installed` +- `script/ensure-go-installed` installs go locally if (go is not installed) || (go is not version 1.7). It also will not install go if it is already installed locally. +- `script/build` builds the binary and places in in `bin/` + +## Notes: + +Currently, `script/ensure-go-installed` will install `go` for Mac OS X and Linux. We welcome PR's to add other platforms. + From 95c9547d541e5926894418771cd4f3479b68e38e Mon Sep 17 00:00:00 2001 From: Jess Breckenridge Date: Wed, 3 May 2017 14:31:45 -0600 Subject: [PATCH 2/5] - Initial documentation on getting started developing for gh-ost. --- doc/{codingghost.md => coding-ghost.md} | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) rename doc/{codingghost.md => coding-ghost.md} (70%) diff --git a/doc/codingghost.md b/doc/coding-ghost.md similarity index 70% rename from doc/codingghost.md rename to doc/coding-ghost.md index 9828dac4b..0023b9f7a 100644 --- a/doc/codingghost.md +++ b/doc/coding-ghost.md @@ -13,11 +13,10 @@ Getting started with gh-ost development is simple! `script/cibuild` performs the following actions: - It runs `script/bootstrap` -- `script/bootstrap` run `script/ensure-go-installed` -- `script/ensure-go-installed` installs go locally if (go is not installed) || (go is not version 1.7). It also will not install go if it is already installed locally. -- `script/build` builds the binary and places in in `bin/` +- `script/bootstrap` runs `script/ensure-go-installed` +- `script/ensure-go-installed` installs go locally if (go is not installed) || (go is not version 1.7). It will not install go if it is already installed locally and at the correct version. +- `script/build` builds the `gh-ost` binary and places in in `bin/` ## Notes: Currently, `script/ensure-go-installed` will install `go` for Mac OS X and Linux. We welcome PR's to add other platforms. - From 13491a0d0bf1f26b73c8cdcff73902b3024d42d9 Mon Sep 17 00:00:00 2001 From: Jess Breckenridge Date: Wed, 3 May 2017 14:35:31 -0600 Subject: [PATCH 3/5] - Adding link to `coding-ghost.md` documentation. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index afc4cf6b2..086fa062d 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,8 @@ But then a rare genetic mutation happened, and the `c` transformed into `t`. And We develop `gh-ost` at GitHub and for the community. We may have different priorities than others. From time to time we may suggest a contribution that is not on our immediate roadmap but which may appeal to others. +Please see [Coding gh-ost](https://github.com/github/gh-ost/blob/develdocs/doc/command-line-flags.md) for a guide to getting started developing with gh-ost. + ## Download/binaries/source `gh-ost` is now GA and stable. From 7df2e0d433d5943a0e56a9574e6791adb6dd8319 Mon Sep 17 00:00:00 2001 From: Jess Breckenridge Date: Thu, 4 May 2017 12:51:00 -0600 Subject: [PATCH 4/5] - Updating PR template to reflect current build workflow --- .github/PULL_REQUEST_TEMPLATE.md | 4 +--- doc/coding-ghost.md | 9 +++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4dc48fd4a..8301e7092 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -16,6 +16,4 @@ This PR [briefly explain what is does] > In case this PR introduced Go code changes: - [ ] contributed code is using same conventions as original code -- [ ] code is formatted via `gofmt` (please avoid `goimports`) -- [ ] code is built via `./build.sh` -- [ ] code is tested via `./test.sh` +- [ ] `script/cibuild` returns with no formatting errors, build errors or unit test errors. diff --git a/doc/coding-ghost.md b/doc/coding-ghost.md index 0023b9f7a..ee26f0c60 100644 --- a/doc/coding-ghost.md +++ b/doc/coding-ghost.md @@ -4,18 +4,15 @@ Getting started with gh-ost development is simple! -- First clone the repository. +- First obtain the repository with `git clone` or `go get`. - From inside of the repository run `script/cibuild` - This will bootstrap the environment if needed, format the code, build the code, and then run the unit test. ## CI build workflow -`script/cibuild` performs the following actions: +`script/cibuild` performs the following actions will bootstrap the environment to build `gh-ost` correctly, build, perform syntax checks and run unit tests. -- It runs `script/bootstrap` -- `script/bootstrap` runs `script/ensure-go-installed` -- `script/ensure-go-installed` installs go locally if (go is not installed) || (go is not version 1.7). It will not install go if it is already installed locally and at the correct version. -- `script/build` builds the `gh-ost` binary and places in in `bin/` +If additional steps are needed, please add them into this workflow so that the workflow remains simple. ## Notes: From b79185ab6471a13f11e87540e0580c6da27af897 Mon Sep 17 00:00:00 2001 From: Jess Breckenridge Date: Thu, 4 May 2017 12:58:22 -0600 Subject: [PATCH 5/5] - Bad copy and paste. Coding gh-ost in README.md actually pointed to command-line-flags.md. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 086fa062d..8de361bf3 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ But then a rare genetic mutation happened, and the `c` transformed into `t`. And We develop `gh-ost` at GitHub and for the community. We may have different priorities than others. From time to time we may suggest a contribution that is not on our immediate roadmap but which may appeal to others. -Please see [Coding gh-ost](https://github.com/github/gh-ost/blob/develdocs/doc/command-line-flags.md) for a guide to getting started developing with gh-ost. +Please see [Coding gh-ost](https://github.com/github/gh-ost/blob/develdocs/doc/coding-ghost.md) for a guide to getting started developing with gh-ost. ## Download/binaries/source