From 678103831a013a70b8c60429c10316b92cf17738 Mon Sep 17 00:00:00 2001 From: adolphlwq Date: Thu, 1 Feb 2018 17:35:07 +0800 Subject: [PATCH 1/2] provide more details for building --- README.md | 28 ++++++++++++++++------------ cmd/completion.go | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 59de155f..fe6682fc 100644 --- a/README.md +++ b/README.md @@ -95,28 +95,32 @@ Download from [Bintray](https://dl.bintray.com/kompose/kompose/latest/kompose-wi ### Building with `go` +__Requisites:__ +1. [make](https://www.gnu.org/software/make/) +2. [Golang](https://golang.org/) v1.6 or later +3. Set `GOPATH` correctly or click [SettingGOPATH](https://github.com/golang/go/wiki/SettingGOPATH) for details -- You need `make` -- You need `go` v1.6 or later. -- If your working copy is not in your `GOPATH`, you need to set it accordingly. - -You can either build via the Makefile: - +__Steps:__ +- clone code +```console +$ git clone https://github.com/kubernetes/kompose.git $GOPATH/src/github.com/kubernetes/kompose +``` +- build by make ```console $ make bin ``` - -Or `go build`: - +- build by go ```console $ go build -o kompose main.go ``` - -To create a multi-platform binary, use the `cross` command via `make`: - +- create a multi-platform binary ```console $ make cross ``` +- do not forget test +```console +$ make test +``` ## Documentation diff --git a/cmd/completion.go b/cmd/completion.go index 29891bd9..7d50d319 100644 --- a/cmd/completion.go +++ b/cmd/completion.go @@ -34,7 +34,7 @@ Will load the shell completion code. }, } -// Generate the approriate autocompletion file +// Generate the appropriate autocompletion file func Generate(cmd *cobra.Command, args []string) error { // Check the passed in arguments From e4a01db7453b8b0a18e7d7c89d4446e0c86b5d63 Mon Sep 17 00:00:00 2001 From: adolphlwq Date: Wed, 7 Feb 2018 17:11:43 +0800 Subject: [PATCH 2/2] change according to suggestions --- README.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index fe6682fc..62d0499b 100644 --- a/README.md +++ b/README.md @@ -101,23 +101,19 @@ __Requisites:__ 3. Set `GOPATH` correctly or click [SettingGOPATH](https://github.com/golang/go/wiki/SettingGOPATH) for details __Steps:__ -- clone code +1. Clone repository ```console $ git clone https://github.com/kubernetes/kompose.git $GOPATH/src/github.com/kubernetes/kompose ``` -- build by make +2. Build with `make` ```console $ make bin ``` -- build by go +3. Or build with `go` ```console $ go build -o kompose main.go ``` -- create a multi-platform binary -```console -$ make cross -``` -- do not forget test +4. Test your changes ```console $ make test ```