You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ho...@apache.org on 2017/05/25 16:04:26 UTC
[incubator-openwhisk-cli] branch master updated: Update the README
and CONTRIBUTING
This is an automated email from the ASF dual-hosted git repository.
houshengbo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git
The following commit(s) were added to refs/heads/master by this push:
new bd466a9 Update the README and CONTRIBUTING
bd466a9 is described below
commit bd466a9480b3c6db4774dba0f2ed2038f69ac88b
Author: Vincent Hou <sh...@us.ibm.com>
AuthorDate: Thu May 25 12:01:48 2017 -0400
Update the README and CONTRIBUTING
---
CONTRIBUTING.md | 43 ++++++++++++++++++++++++++++++++++++-------
README.md | 36 ++++++++++++++++++++++++------------
2 files changed, 60 insertions(+), 19 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 99168e9..32e9953 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,13 +1,41 @@
-# Contributing to go-whisk-cli
+# Contributing to OpenWhisk CLI
+
+## Set up the development environment
+
+In order to develop OpenWhisk CLI on your local machine. First, install the prerequisites to
+download and build OpenWhisk CLI: [installing Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
+
+Then, save the project in the location compliant with the Go standard naming convention, which means you need to
+created a directory named $GOPATH/src/github.com/apache/ and download the source code via the following commands:
+
+```
+$ cd $GOPATH/src/github.com/apache/
+$ git clone https://github.com/apache/incubator-openwhisk-cli.git
+```
+
+After cloning the source code, you need to install all the dependencies by running the command under openwhisk cli folder:
+
+```
+$ go get -d -t ./...
+```
+
+or
+
+```
+$ make deps
+```
+
+You should be able to build the binaries with either the go command or the Gradle command, which is available in [README](https://github.com/apache/incubator-openwhisk-cli/blob/master/README.md).
+
## Proposing new features
-If you would like to implement a new feature, please [raise an issue](https://github.ibm.com/BlueMix-Fabric/go-whisk-cli) before sending a pull request so the feature can be discussed.
+If you would like to implement a new feature, please [raise an issue](https://github.com/apache/incubator-openwhisk-cli/issues) before sending a pull request so the feature can be discussed.
This is to avoid you spending your valuable time working on a feature that the project developers are not willing to accept into the code base.
## Fixing bugs
-If you would like to fix a bug, please [raise an issue](https://github.ibm.com/BlueMix-Fabric/go-whisk-cli) before sending a pull request so it can be discussed.
+If you would like to fix a bug, please [raise an issue](https://github.com/apache/incubator-openwhisk-cli/issues) before sending a pull request so it can be discussed.
If the fix is trivial or non controversial then this is not usually necessary.
## Merge approval
@@ -17,9 +45,12 @@ indicate acceptance. A change requires LGTMs from two of the maintainers of each
component affected.
## Communication
+
Please use [Slack channel #whisk-users](https://cloudplatform.slack.com/messages/whisk_cli).
+
## Setup
-Project was written with `Go v1.5`. It has a dependency on [go-whisk](https://github.ibm.com/BlueMix-Fabric/go-whisk), which has to be manually resolved (because of GHE).
+
+Project was written with `Go v1.7`. It has a dependency on [incubator-openwhisk-client-go](https://github.com/apache/incubator-openwhisk-client-go).
## Testing
@@ -27,8 +58,6 @@ This repository needs unit tests.
Please provide information that helps the developer test any changes they make before submitting.
-Should pass the cli integration test defined in the [main whisk project](https://github.rtp.raleigh.ibm.com/whisk-development/openwhisk/blob/master/tests/src/common/WskCli.java).
-
## Coding style guidelines
-Use idomatic go. (try to) Document exported functions.
+Use idomatic go. Document exported functions.
diff --git a/README.md b/README.md
index be69a1f..70879cb 100644
--- a/README.md
+++ b/README.md
@@ -16,25 +16,21 @@ binary, which fits your local environment.
# How to build the binary locally
-You can also choose to build the binary locally based on the source code. First, install the prerequisites to
-download and build OpenWhisk CLI: [installing Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).
+You can also choose to build the binaries locally from the source code with Go tool.
-Then, download the source code via the Git command:
+Make sure that you have Go installed [installing Go](https://golang.org/doc/install), and `$GOPATH` is defined [Go development environment](https://golang.org/doc/code.html).
+
+Then download the source code of the OpenWhisk CLI and the dependencies by typing:
```
-$ git clone https://github.com/apache/incubator-openwhisk-cli.git
+$ cd $GOPATH
+$ go get github.com/apache/incubator-openwhisk-cli
```
-OpenWhisk CLI(`wsk`) is produced in a Docker container during the build process which is copied from the
-Docker container to the local file system in the following directory: bin. This binary will be platform
-specific, it will only run on the operating system, and CPU architecture that matches the build machine.
## Build the binary with Go
-The binary can be built by Go build command. Make sure that you have Go installed: [installing Go](https://golang.org/doc/install).
-
-After that, open an terminal, go to the directory of OpenWhisk CLI home directory, and build the binary via
-the following command:
+Open an terminal, go to the directory of OpenWhisk CLI home directory, and build the binary via the following command:
```
$ go build -o wsk
@@ -70,7 +66,23 @@ or run the following command for Windows:
$ ./gradlew.bat distDocker
```
-Finally, you can find the binary `wsk` or `wsk.exe` in the bin folder under the OpenWhisk CLI home directory.
+Finally, you can find the binary `wsk` or `wsk.exe` in the bin folder under the OpenWhisk CLI home directory. In
+addition, it is also available under the folder bin/<os>/<cpu arc>/. For example, if your local operating system is Mac,
+and the CPU architecture is amd64, the binary and its compressed package can also be found under bin/mac/amd64/.
+
+OpenWhisk CLI(`wsk`) is produced in a Docker container during the build process which is copied from the
+Docker container to the local file system in the following directory: bin. This binary will be platform
+specific, it will only run on the operating system, and CPU architecture that matches the build machine.
+
+If you would like to build the binaries available for all the operating systems and architectures, run the following
+command:
+
+```
+$ ./gradlew distDocker -PcrossCompileCLI=true
+```
+
+Then, you will find the binaries and their compressed packages generated under the folder bin/<os>/<cpu arc>/ for each
+operating system and CPU architecture pair. We supports both amd64 and 386 for Linux, Mac and Windows operating systems.
# How to use the binary
--
To stop receiving notification emails like this one, please contact
['"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>'].