From eb723c6d9befe605bd86e9997d5185430a143647 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Wed, 24 Feb 2021 15:58:21 -0600 Subject: [PATCH 01/22] Remove last Godeps, update Gogradle for gomod and Ansible setup --- .travis.yml | 2 +- Godeps/Godeps.json | 154 --------------------------------- Godeps/Readme | 5 -- build.gradle | 82 ++++++++++-------- tools/travis/test_openwhisk.sh | 6 +- 5 files changed, 50 insertions(+), 199 deletions(-) delete mode 100644 Godeps/Godeps.json delete mode 100644 Godeps/Readme diff --git a/.travis.yml b/.travis.yml index 6bf7b0194..bf6a223a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,7 +52,7 @@ install: before_script: - cd $TRAVIS_BUILD_DIR - ./gradlew --console=plain checkScalafmtAll - - GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) + - GO_FILES=$(find . -iname '*.go' -type f) - test -z "$(gofmt -s -l $(echo $GO_FILES))" - cd $TRAVIS_BUILD_DIR/.. - git clone https://github.com/apache/openwhisk-utilities.git diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json deleted file mode 100644 index 6996cb916..000000000 --- a/Godeps/Godeps.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "ImportPath": "github.com/apache/openwhisk-cli", - "GoVersion": "go1.14", - "GodepVersion": "v80", - "Deps": [ - { - "ImportPath": "github.com/apache/openwhisk-client-go/whisk", - "Comment": "1.1.0-3-g17d5563", - "Rev": "17d556327cd39cb6d6854667fa75c35ef9f2e6f1" - }, - { - "ImportPath": "github.com/apache/openwhisk-client-go/wski18n", - "Comment": "1.1.0-3-g17d5563", - "Rev": "17d556327cd39cb6d6854667fa75c35ef9f2e6f1" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/cmd", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/conductor", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/dependencies", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/deployers", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/parsers", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/runtimes", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/utils", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/webaction", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/wskderrors", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/wskenv", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/wski18n", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/apache/openwhisk-wskdeploy/wskprint", - "Comment": "latest-4-g3b4b09d", - "Rev": "3b4b09d539d2591c903acbb7b9257beef49110dd" - }, - { - "ImportPath": "github.com/cloudfoundry/jibber_jabber", - "Rev": "bcc4c8345a21301bf47c032ff42dd1aae2fe3027" - }, - { - "ImportPath": "github.com/fatih/color", - "Comment": "v1.5.0", - "Rev": "570b54cabe6b8eb0bc2dfce68d964677d63b5260" - }, - { - "ImportPath": "github.com/ghodss/yaml", - "Comment": "v1.0.0-14-g25d852a", - "Rev": "25d852aebe32c875e9c044af3eef9c7dc6bc777f" - }, - { - "ImportPath": "github.com/google/go-querystring/query", - "Rev": "9235644dd9e52eeae6fa48efd539fdc351a0af53" - }, - { - "ImportPath": "github.com/hokaccha/go-prettyjson", - "Rev": "f75235bd99dad4e98ff360db8372d5c0ef1d054a" - }, - { - "ImportPath": "github.com/inconshreveable/mousetrap", - "Comment": "v1.0", - "Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75" - }, - { - "ImportPath": "github.com/mattn/go-colorable", - "Comment": "v0.0.7", - "Rev": "d228849504861217f796da67fae4f6e347643f15" - }, - { - "ImportPath": "github.com/mattn/go-isatty", - "Rev": "66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8" - }, - { - "ImportPath": "github.com/mitchellh/go-homedir", - "Comment": "v1.1.0", - "Rev": "af06845cf3004701891bf4fdb884bfe4920b3727" - }, - { - "ImportPath": "github.com/nicksnyder/go-i18n/i18n", - "Comment": "v1.6.0-1-g991e81c", - "Rev": "991e81cc94f6c54209edb3192cb98e3995ad71c1" - }, - { - "ImportPath": "github.com/nicksnyder/go-i18n/i18n/bundle", - "Comment": "v1.6.0-1-g991e81c", - "Rev": "991e81cc94f6c54209edb3192cb98e3995ad71c1" - }, - { - "ImportPath": "github.com/nicksnyder/go-i18n/i18n/language", - "Comment": "v1.6.0-1-g991e81c", - "Rev": "991e81cc94f6c54209edb3192cb98e3995ad71c1" - }, - { - "ImportPath": "github.com/nicksnyder/go-i18n/i18n/translation", - "Comment": "v1.6.0-1-g991e81c", - "Rev": "991e81cc94f6c54209edb3192cb98e3995ad71c1" - }, - { - "ImportPath": "github.com/spf13/cobra", - "Rev": "6e91dded25d73176bf7f60b40dd7aa1f0bf9be8d" - }, - { - "ImportPath": "github.com/spf13/pflag", - "Rev": "5ccb023bc27df288a957c5e994cd44fd19619465" - }, - { - "ImportPath": "golang.org/x/sys/unix", - "Rev": "9a2e24c3733eddc63871eda99f253e2db29bd3b9" - }, - { - "ImportPath": "gopkg.in/yaml.v2", - "Rev": "eb3733d160e74a9c7e442f435eb3bea458e1d19f" - } - ] -} diff --git a/Godeps/Readme b/Godeps/Readme deleted file mode 100644 index 4cdaa53d5..000000000 --- a/Godeps/Readme +++ /dev/null @@ -1,5 +0,0 @@ -This directory tree is generated automatically by godep. - -Please do not edit. - -See https://github.com/tools/godep for more information. diff --git a/build.gradle b/build.gradle index 84e9ccdbb..e14a65ab5 100644 --- a/build.gradle +++ b/build.gradle @@ -34,47 +34,55 @@ subprojects { scalafmt.configFilePath = gradle.scalafmt.config } +// Gogradle Config: +// https://github.com/gogradle/gogradle/blob/master/docs/getting-started.md#configuration golang { packagePath = 'github.com/apache/openwhisk-cli' as String buildTags = (rootProject.findProperty('goTags')?:'').split(',') - goVersion = '1.9.3' + //goVersion = '1.9.3' } -dependencies { - golang { - // BEGIN - Imported from Godeps - build(['name':'github.com/cloudfoundry/jibber_jabber', 'version':'bcc4c8345a21301bf47c032ff42dd1aae2fe3027', 'transitive':false]) - build(['name':'github.com/fatih/color', 'version':'570b54cabe6b8eb0bc2dfce68d964677d63b5260', 'transitive':false]) - build(['name':'github.com/google/go-querystring/query', 'version':'9235644dd9e52eeae6fa48efd539fdc351a0af53', 'transitive':false]) - build(['name':'github.com/hokaccha/go-prettyjson', 'version':'f75235bd99dad4e98ff360db8372d5c0ef1d054a', 'transitive':false]) - build(['name':'github.com/inconshreveable/mousetrap', 'version':'76626ae9c91c4f2a10f34cad8ce83ea42c93bb75', 'transitive':false]) - build(['name':'github.com/mattn/go-colorable', 'version':'d228849504861217f796da67fae4f6e347643f15', 'transitive':false]) - build(['name':'github.com/mattn/go-isatty', 'version':'a5cdd64afdee435007ee3e9f6ed4684af949d568', 'transitive':false]) - build(['name':'github.com/mitchellh/go-homedir', 'version':'1111e456ffea841564ac0fa5f69c26ef44dafec9', 'transitive':false]) - build(['name':'github.com/nicksnyder/go-i18n/i18n/...', 'version':'991e81cc94f6c54209edb3192cb98e3995ad71c1', 'transitive':false]) - build(['name':'github.com/spf13/cobra', 'version':'1238ba19d24b0b9ceee2094e1cb31947d45c3e86', 'transitive':false]) - build(['name':'github.com/spf13/pflag', 'version':'81378bbcd8a1005f72b1e8d7579e5dd7b2d612ab', 'transitive':false]) - build(['name':'golang.org/x/sys/unix', 'version':'7f918dd405547ecb864d14a8ecbbfe205b5f930f', 'transitive':false]) - build(['name':'gopkg.in/yaml.v2', 'version':'eb3733d160e74a9c7e442f435eb3bea458e1d19f', 'transitive':false]) - build(['name':'github.com/ghodss/yaml', 'version':'0ca9ea5df5451ffdf184b4428c902747c2c11cd7', 'transitive':false]) - build(['name':'github.com/apache/openwhisk-client-go/whisk','version':'44551f1f3b715e87c0319b55762d50c71d214460','transitive':false]) - build(['name':'github.com/apache/openwhisk-wskdeploy','version':'cbe7c52d99c1ead5172946d3aeb33adb5d5c40b2','transitive':false]) - // END - Imported from Godeps - test name:'github.com/stretchr/testify', version:'b91bfb9ebec76498946beb6af7c0230c7cc7ba6c', transitive:false //, tag: 'v1.2.0' - test name:'github.com/spf13/viper', version:'aafc9e6bc7b7bb53ddaa75a5ef49a17d6e654be5', transitive:false - test name:'github.com/cpuguy83/go-md2man/md2man', version:'1d903dcb749992f3741d744c0f8376b4bd7eb3e1', transitive:false //, tag:'v1.0.7' - test name:'github.com/davecgh/go-spew/spew', version:'346938d642f2ec3594ed81d874461961cd0faa76', transitive:false //, tag:'v1.1.0' - test name:'github.com/pmezard/go-difflib/difflib', version:'792786c7400a136282c1664665ae0a8db921c6c2', transitive:false - - test name:'github.com/onsi/ginkgo', version:'00054c0bb96fc880d4e0be1b90937fad438c5290', transitive: false - test name:'github.com/hpcloud/tail',version: 'a1dbeea552b7c8df4b542c66073e393de198a800', transitive: false - test name:'gopkg.in/tomb.v1', version:'c131134a1947e9afd9cecfe11f4c6dff0732ae58', transitive: false - test name:'gopkg.in/fsnotify/fsnotify.v1', version:'7be54206639f256967dd82fa767397ba5f8f48f5', transitive: false - test name:'github.com/onsi/gomega', version:'c893efa28eb45626cdaa76c9f653b62488858837', transitive: false - test name:'golang.org/x/net/html', version:'b68f30494add4df6bd8ef5e82803f308e7f7c59c', transitive: false - test name:'golang.org/x/text', version:'ece95c760240037f89ebcbdd7155ac8cb52e38fa', transitive: false - } -} +// The `gogradle` plugin was designed to work with `govendor` and `godeps` tools +// We must disable its tasks that attempt to "fetch" dependencies +// into a "/vendor" directory and use them to build the project (which will fail) +installDependencies.enabled = false +resolveBuildDependencies.enabled = false + +// dependencies { +// golang { +// // BEGIN - Imported from Godeps +// build(['name':'github.com/cloudfoundry/jibber_jabber', 'version':'bcc4c8345a21301bf47c032ff42dd1aae2fe3027', 'transitive':false]) +// build(['name':'github.com/fatih/color', 'version':'570b54cabe6b8eb0bc2dfce68d964677d63b5260', 'transitive':false]) +// build(['name':'github.com/google/go-querystring/query', 'version':'9235644dd9e52eeae6fa48efd539fdc351a0af53', 'transitive':false]) +// build(['name':'github.com/hokaccha/go-prettyjson', 'version':'f75235bd99dad4e98ff360db8372d5c0ef1d054a', 'transitive':false]) +// build(['name':'github.com/inconshreveable/mousetrap', 'version':'76626ae9c91c4f2a10f34cad8ce83ea42c93bb75', 'transitive':false]) +// build(['name':'github.com/mattn/go-colorable', 'version':'d228849504861217f796da67fae4f6e347643f15', 'transitive':false]) +// build(['name':'github.com/mattn/go-isatty', 'version':'a5cdd64afdee435007ee3e9f6ed4684af949d568', 'transitive':false]) +// build(['name':'github.com/mitchellh/go-homedir', 'version':'1111e456ffea841564ac0fa5f69c26ef44dafec9', 'transitive':false]) +// build(['name':'github.com/nicksnyder/go-i18n/i18n/...', 'version':'991e81cc94f6c54209edb3192cb98e3995ad71c1', 'transitive':false]) +// build(['name':'github.com/spf13/cobra', 'version':'1238ba19d24b0b9ceee2094e1cb31947d45c3e86', 'transitive':false]) +// build(['name':'github.com/spf13/pflag', 'version':'81378bbcd8a1005f72b1e8d7579e5dd7b2d612ab', 'transitive':false]) +// build(['name':'golang.org/x/sys/unix', 'version':'7f918dd405547ecb864d14a8ecbbfe205b5f930f', 'transitive':false]) +// build(['name':'gopkg.in/yaml.v2', 'version':'eb3733d160e74a9c7e442f435eb3bea458e1d19f', 'transitive':false]) +// build(['name':'github.com/ghodss/yaml', 'version':'0ca9ea5df5451ffdf184b4428c902747c2c11cd7', 'transitive':false]) +// build(['name':'github.com/apache/openwhisk-client-go/whisk','version':'44551f1f3b715e87c0319b55762d50c71d214460','transitive':false]) +// build(['name':'github.com/apache/openwhisk-wskdeploy','version':'cbe7c52d99c1ead5172946d3aeb33adb5d5c40b2','transitive':false]) +// // END - Imported from Godeps +// test name:'github.com/stretchr/testify', version:'b91bfb9ebec76498946beb6af7c0230c7cc7ba6c', transitive:false //, tag: 'v1.2.0' +// test name:'github.com/spf13/viper', version:'aafc9e6bc7b7bb53ddaa75a5ef49a17d6e654be5', transitive:false +// test name:'github.com/cpuguy83/go-md2man/md2man', version:'1d903dcb749992f3741d744c0f8376b4bd7eb3e1', transitive:false //, tag:'v1.0.7' +// test name:'github.com/davecgh/go-spew/spew', version:'346938d642f2ec3594ed81d874461961cd0faa76', transitive:false //, tag:'v1.1.0' +// test name:'github.com/pmezard/go-difflib/difflib', version:'792786c7400a136282c1664665ae0a8db921c6c2', transitive:false + +// test name:'github.com/onsi/ginkgo', version:'00054c0bb96fc880d4e0be1b90937fad438c5290', transitive: false +// test name:'github.com/hpcloud/tail',version: 'a1dbeea552b7c8df4b542c66073e393de198a800', transitive: false +// test name:'gopkg.in/tomb.v1', version:'c131134a1947e9afd9cecfe11f4c6dff0732ae58', transitive: false +// test name:'gopkg.in/fsnotify/fsnotify.v1', version:'7be54206639f256967dd82fa767397ba5f8f48f5', transitive: false +// test name:'github.com/onsi/gomega', version:'c893efa28eb45626cdaa76c9f653b62488858837', transitive: false +// test name:'golang.org/x/net/html', version:'b68f30494add4df6bd8ef5e82803f308e7f7c59c', transitive: false +// test name:'golang.org/x/text', version:'ece95c760240037f89ebcbdd7155ac8cb52e38fa', transitive: false +// } +// } /* The OpenWhiskPlatform class is a utility class to make the rest of what @@ -194,7 +202,7 @@ if (rootProject.hasProperty('buildPlatforms')) { rootProject.ext.platforms = [ 'linux-386', 'linux-amd64', 'linux-s390x', 'linux-ppc64le', 'linux-arm', 'linux-arm64', - 'darwin-386', 'darwin-amd64', + 'darwin-amd64', 'windows-386', 'windows-amd64' ].collect { new OpenWhiskPlatform(it) } } else { diff --git a/tools/travis/test_openwhisk.sh b/tools/travis/test_openwhisk.sh index c59f52045..aa0e9e4eb 100755 --- a/tools/travis/test_openwhisk.sh +++ b/tools/travis/test_openwhisk.sh @@ -80,12 +80,14 @@ cd $TRAVIS_BUILD_DIR # # Set up the OpenWhisk environment for integration testing # - cd $OPENWHISK_HOME +# Install Ansible and other pre-reqs +./tools/travis/setup.sh + # Fire up the cluster -cd $OPENWHISK_HOME/ansible ANSIBLE_CMD="ansible-playbook -i environments/local -e docker_image_prefix=openwhisk -e docker_image_tag=nightly" +cd $OPENWHISK_HOME/ansible $ANSIBLE_CMD setup.yml $ANSIBLE_CMD prereq.yml $ANSIBLE_CMD couchdb.yml From 3b04795aea3c1a95f0d2eb2a38985902a8fce657 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Wed, 24 Feb 2021 18:18:33 -0600 Subject: [PATCH 02/22] Remove last Godeps, update Gogradle for gomod and Ansible setup --- build.gradle | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index e14a65ab5..421d8ec31 100644 --- a/build.gradle +++ b/build.gradle @@ -222,7 +222,8 @@ task goI18n(type: com.github.blindpirate.gogradle.Go, dependsOn: getGoI18n) { // parse the command with the GString engine at execution time. run '${GOPATH}/bin/go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources' } -resolveBuildDependencies.dependsOn(goI18n) + +//resolveBuildDependencies.dependsOn(goI18n) /* Checks -- add golint and scancode to the checks run prior to build. From 423a41dcf8b710c8cbc44c2532679fc9984a1cfc Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 10:45:31 -0600 Subject: [PATCH 03/22] Add dependson clause to build i18n (i18n_resources.go) before the goBuild task --- build.gradle | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.gradle b/build.gradle index 421d8ec31..0fe8ccb32 100644 --- a/build.gradle +++ b/build.gradle @@ -253,6 +253,8 @@ goBuild { golang.packagePath ] as List) } +goBuild.dependsOn goI18n + gofmt { gofmt "-s -w ." } From 9fcadc06209b9f01944fe26805764a936dce4516 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 15:32:26 -0600 Subject: [PATCH 04/22] Update build.gradle to use Exec tasks for go-bindata and i18n --- .gitignore | 9 +++++++-- build.gradle | 36 ++++++++++++++++++++++++++++-------- go.mod | 11 ++++------- go.sum | 14 +++++++------- 4 files changed, 46 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 1128fb1fb..ed14c6965 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,10 @@ -javascript/ + +# Built or generated files +openwhisk-cli wsk wsk.exe scripts -Godeps/_workspace +Godeps/ *~ # IDE-related exclusions @@ -20,3 +22,6 @@ wski18n/i18n_resources.go bin/ tests/build/ tests/out/ + +# Exmaples and Misc +javascript/ diff --git a/build.gradle b/build.gradle index 0fe8ccb32..52457985b 100644 --- a/build.gradle +++ b/build.gradle @@ -210,18 +210,38 @@ if (rootProject.hasProperty('buildPlatforms')) { } } +task getEnv(type: Exec) { + commandLine 'printenv' +} + +task getGoVersion(type: Exec) { + commandLine 'go', 'version' +} + +task getGoBinData(type: Exec) { + executable = 'go' + args = ['get', '-u', 'github.com/jteeuwen/go-bindata/...'] +} + +task goI18n(type: Exec) { + dependsOn 'getGoBinData' + executable = 'go-bindata' + args = ['-pkg', 'wski18n', '-o', 'wski18n/i18n_resources.go', 'wski18n/resources'] +} + /* I18n support */ -task getGoI18n(type: com.github.blindpirate.gogradle.Go) { - go 'get -u github.com/jteeuwen/go-bindata/...' -} +// task getGoI18n(type: com.github.blindpirate.gogradle.Go) { +// go 'get -u github.com/jteeuwen/go-bindata/...' +// } -task goI18n(type: com.github.blindpirate.gogradle.Go, dependsOn: getGoI18n) { - // WARNING: The single quotes are intentional! The gogradle plugin will - // parse the command with the GString engine at execution time. - run '${GOPATH}/bin/go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources' -} +// task goI18n(type: com.github.blindpirate.gogradle.Go) { +// // WARNING: The single quotes are intentional! The gogradle plugin will +// // parse the command with the GString engine at execution time. +// dependsOn 'getGoI18n' +// run '${GOPATH}/bin/go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources' +// } //resolveBuildDependencies.dependsOn(goI18n) diff --git a/go.mod b/go.mod index 69b2f2a94..5f96b4aed 100644 --- a/go.mod +++ b/go.mod @@ -8,19 +8,16 @@ require ( github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 github.com/fatih/color v1.9.0 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 - github.com/google/go-querystring v1.0.0 - github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e - github.com/inconshreveable/mousetrap v1.0.0 + github.com/google/go-querystring v1.0.0 // indirect + github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e // indirect github.com/mattn/go-colorable v0.1.7 - github.com/mattn/go-isatty v0.0.12 github.com/mitchellh/go-homedir v1.1.0 github.com/nicksnyder/go-i18n v1.10.1 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/pelletier/go-toml v1.8.0 // indirect github.com/spf13/cobra v1.0.0 - github.com/spf13/pflag v1.0.5 + github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.6.1 - golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a - gopkg.in/yaml.v2 v2.3.0 + golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a // indirect ) diff --git a/go.sum b/go.sum index d39f2c802..2c6881548 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,5 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -7,8 +8,6 @@ github.com/apache/openwhisk-client-go v0.0.0-20191018191012-ee5b8709787c h1:HJim github.com/apache/openwhisk-client-go v0.0.0-20191018191012-ee5b8709787c/go.mod h1:jLLKYP7+1+LFlIJW1n9U1gqeveLM1HIwa4ZHNOFxjPw= github.com/apache/openwhisk-client-go v0.0.0-20200824013630-44551f1f3b71 h1:yTMBqN5j2u/nnwjR+MtegLSfExN5s1O7EAyZ3XS7PR8= github.com/apache/openwhisk-client-go v0.0.0-20200824013630-44551f1f3b71/go.mod h1:jLLKYP7+1+LFlIJW1n9U1gqeveLM1HIwa4ZHNOFxjPw= -github.com/apache/openwhisk-wskdeploy v0.0.0-20200526130153-26308cad60c9 h1:554nLEpjcUQaSw1C6pHz6YuDxtcqG3pveBwWZ3OI67k= -github.com/apache/openwhisk-wskdeploy v0.0.0-20200526130153-26308cad60c9/go.mod h1:11PhGZEWM97VMRcnLrA158QuLEwmZS93SvB1kChGm1Y= github.com/apache/openwhisk-wskdeploy v0.0.0-20200827195556-535f5a9d3942 h1:SDeUi5Wqtv2J/4FkbjyZ3pCEMfy88DMTQix+qmAjo9I= github.com/apache/openwhisk-wskdeploy v0.0.0-20200827195556-535f5a9d3942/go.mod h1:jRNFwq0Ribf74Jd7oYvoDtBH+RXb5nCVAIHji47ESjY= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -56,11 +55,13 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v0.0.0-20160401233042-9235644dd9e5 h1:oERTZ1buOUYlpmKaqlO5fYmz8cZ1rYu5DieJzF4ZVmU= github.com/google/go-querystring v0.0.0-20160401233042-9235644dd9e5/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -85,8 +86,10 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.7.1-0.20160908093658-0723e352fa35/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -95,8 +98,6 @@ github.com/mattn/go-colorable v0.0.7/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c h1:3nKFouDdpgGUV/uerJcYWH45ZbJzX0SiVWfTgmUeTzc= -github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= @@ -191,7 +192,6 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20161108151328-9a2e24c3733e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -209,8 +209,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443 h1:X18bCaipMcoJGm27Nv7zr4XYPKGUy92GtqboKC2Hxaw= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a h1:i47hUS795cOydZI4AwJQCKXOr4BvxzvikwDoDtHhP2Y= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -232,9 +230,11 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= From 0e280424b000c6860e8ca9f04c70db9c8647d037 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 16:01:36 -0600 Subject: [PATCH 05/22] Update build.gradle to use Exec tasks for go-bindata and i18n --- build.gradle | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index 52457985b..3f14221eb 100644 --- a/build.gradle +++ b/build.gradle @@ -47,6 +47,7 @@ golang { // into a "/vendor" directory and use them to build the project (which will fail) installDependencies.enabled = false resolveBuildDependencies.enabled = false +resolveTestDependencies.enabled = false // dependencies { // golang { @@ -210,13 +211,13 @@ if (rootProject.hasProperty('buildPlatforms')) { } } -task getEnv(type: Exec) { - commandLine 'printenv' -} +// task getEnv(type: Exec) { +// commandLine 'printenv' +// } -task getGoVersion(type: Exec) { - commandLine 'go', 'version' -} +// task getGoVersion(type: Exec) { +// commandLine 'go', 'version' +// } task getGoBinData(type: Exec) { executable = 'go' @@ -249,14 +250,25 @@ task goI18n(type: Exec) { Checks -- add golint and scancode to the checks run prior to build. The get step is needed to be sure a golint binary is available to run. */ -task getGoLint(type: com.github.blindpirate.gogradle.Go) { - go 'get -u golang.org/x/lint/golint' +// task getGoLint(type: com.github.blindpirate.gogradle.Go) { +// go 'get -u golang.org/x/lint/golint' +// } + +// task goLint(type: com.github.blindpirate.gogradle.Go, dependsOn: getGoLint) { +// // WARNING: The single quotes are intentional! The gogradle plugin will +// // parse the command with the GString engine at execution time. +// run '${GOPATH}/bin/golint ' + golang.packagePath +// } + +task getGoLint(type: Exec) { + executable = 'go' + args = ['get', '-u', 'golang.org/x/lint/golint'] } -task goLint(type: com.github.blindpirate.gogradle.Go, dependsOn: getGoLint) { - // WARNING: The single quotes are intentional! The gogradle plugin will - // parse the command with the GString engine at execution time. - run '${GOPATH}/bin/golint ' + golang.packagePath +task goLint(type: Exec) { + dependsOn 'getGoLint' + executable = 'golint' + args = [golang.packagePath] } goCheck.dependsOn(goLint) From da857524b5b47ed65c2dc5296472a181ebe7789a Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 16:58:55 -0600 Subject: [PATCH 06/22] Task goGetBinData for i18n support must run as a deps. of goPrepare not goBuild --- build.gradle | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 3f14221eb..b0492f516 100644 --- a/build.gradle +++ b/build.gradle @@ -222,12 +222,20 @@ if (rootProject.hasProperty('buildPlatforms')) { task getGoBinData(type: Exec) { executable = 'go' args = ['get', '-u', 'github.com/jteeuwen/go-bindata/...'] + + doLast{ + println commandLine + } } task goI18n(type: Exec) { dependsOn 'getGoBinData' executable = 'go-bindata' args = ['-pkg', 'wski18n', '-o', 'wski18n/i18n_resources.go', 'wski18n/resources'] + + doLast{ + println commandLine + } } /* @@ -272,6 +280,7 @@ task goLint(type: Exec) { } goCheck.dependsOn(goLint) +goPrepare.dependsOn(goI18n) goBuild { targetPlatform = rootProject.platforms*.goPlatform @@ -285,8 +294,6 @@ goBuild { golang.packagePath ] as List) } -goBuild.dependsOn goI18n - gofmt { gofmt "-s -w ." } From 91dac42a5164f02b3fef0c2a3aa427235184c0ee Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 18:01:46 -0600 Subject: [PATCH 07/22] Cleanup build.gradle; remove old tasks --- build.gradle | 89 +++------------------------------------------------- 1 file changed, 4 insertions(+), 85 deletions(-) diff --git a/build.gradle b/build.gradle index b0492f516..fec7c8e29 100644 --- a/build.gradle +++ b/build.gradle @@ -34,57 +34,6 @@ subprojects { scalafmt.configFilePath = gradle.scalafmt.config } -// Gogradle Config: -// https://github.com/gogradle/gogradle/blob/master/docs/getting-started.md#configuration -golang { - packagePath = 'github.com/apache/openwhisk-cli' as String - buildTags = (rootProject.findProperty('goTags')?:'').split(',') - //goVersion = '1.9.3' -} - -// The `gogradle` plugin was designed to work with `govendor` and `godeps` tools -// We must disable its tasks that attempt to "fetch" dependencies -// into a "/vendor" directory and use them to build the project (which will fail) -installDependencies.enabled = false -resolveBuildDependencies.enabled = false -resolveTestDependencies.enabled = false - -// dependencies { -// golang { -// // BEGIN - Imported from Godeps -// build(['name':'github.com/cloudfoundry/jibber_jabber', 'version':'bcc4c8345a21301bf47c032ff42dd1aae2fe3027', 'transitive':false]) -// build(['name':'github.com/fatih/color', 'version':'570b54cabe6b8eb0bc2dfce68d964677d63b5260', 'transitive':false]) -// build(['name':'github.com/google/go-querystring/query', 'version':'9235644dd9e52eeae6fa48efd539fdc351a0af53', 'transitive':false]) -// build(['name':'github.com/hokaccha/go-prettyjson', 'version':'f75235bd99dad4e98ff360db8372d5c0ef1d054a', 'transitive':false]) -// build(['name':'github.com/inconshreveable/mousetrap', 'version':'76626ae9c91c4f2a10f34cad8ce83ea42c93bb75', 'transitive':false]) -// build(['name':'github.com/mattn/go-colorable', 'version':'d228849504861217f796da67fae4f6e347643f15', 'transitive':false]) -// build(['name':'github.com/mattn/go-isatty', 'version':'a5cdd64afdee435007ee3e9f6ed4684af949d568', 'transitive':false]) -// build(['name':'github.com/mitchellh/go-homedir', 'version':'1111e456ffea841564ac0fa5f69c26ef44dafec9', 'transitive':false]) -// build(['name':'github.com/nicksnyder/go-i18n/i18n/...', 'version':'991e81cc94f6c54209edb3192cb98e3995ad71c1', 'transitive':false]) -// build(['name':'github.com/spf13/cobra', 'version':'1238ba19d24b0b9ceee2094e1cb31947d45c3e86', 'transitive':false]) -// build(['name':'github.com/spf13/pflag', 'version':'81378bbcd8a1005f72b1e8d7579e5dd7b2d612ab', 'transitive':false]) -// build(['name':'golang.org/x/sys/unix', 'version':'7f918dd405547ecb864d14a8ecbbfe205b5f930f', 'transitive':false]) -// build(['name':'gopkg.in/yaml.v2', 'version':'eb3733d160e74a9c7e442f435eb3bea458e1d19f', 'transitive':false]) -// build(['name':'github.com/ghodss/yaml', 'version':'0ca9ea5df5451ffdf184b4428c902747c2c11cd7', 'transitive':false]) -// build(['name':'github.com/apache/openwhisk-client-go/whisk','version':'44551f1f3b715e87c0319b55762d50c71d214460','transitive':false]) -// build(['name':'github.com/apache/openwhisk-wskdeploy','version':'cbe7c52d99c1ead5172946d3aeb33adb5d5c40b2','transitive':false]) -// // END - Imported from Godeps -// test name:'github.com/stretchr/testify', version:'b91bfb9ebec76498946beb6af7c0230c7cc7ba6c', transitive:false //, tag: 'v1.2.0' -// test name:'github.com/spf13/viper', version:'aafc9e6bc7b7bb53ddaa75a5ef49a17d6e654be5', transitive:false -// test name:'github.com/cpuguy83/go-md2man/md2man', version:'1d903dcb749992f3741d744c0f8376b4bd7eb3e1', transitive:false //, tag:'v1.0.7' -// test name:'github.com/davecgh/go-spew/spew', version:'346938d642f2ec3594ed81d874461961cd0faa76', transitive:false //, tag:'v1.1.0' -// test name:'github.com/pmezard/go-difflib/difflib', version:'792786c7400a136282c1664665ae0a8db921c6c2', transitive:false - -// test name:'github.com/onsi/ginkgo', version:'00054c0bb96fc880d4e0be1b90937fad438c5290', transitive: false -// test name:'github.com/hpcloud/tail',version: 'a1dbeea552b7c8df4b542c66073e393de198a800', transitive: false -// test name:'gopkg.in/tomb.v1', version:'c131134a1947e9afd9cecfe11f4c6dff0732ae58', transitive: false -// test name:'gopkg.in/fsnotify/fsnotify.v1', version:'7be54206639f256967dd82fa767397ba5f8f48f5', transitive: false -// test name:'github.com/onsi/gomega', version:'c893efa28eb45626cdaa76c9f653b62488858837', transitive: false -// test name:'golang.org/x/net/html', version:'b68f30494add4df6bd8ef5e82803f308e7f7c59c', transitive: false -// test name:'golang.org/x/text', version:'ece95c760240037f89ebcbdd7155ac8cb52e38fa', transitive: false -// } -// } - /* The OpenWhiskPlatform class is a utility class to make the rest of what happens with platforms a bit more understandable. A "Platform" is a tuple @@ -211,14 +160,9 @@ if (rootProject.hasProperty('buildPlatforms')) { } } -// task getEnv(type: Exec) { -// commandLine 'printenv' -// } - -// task getGoVersion(type: Exec) { -// commandLine 'go', 'version' -// } - +/* + I18n support + */ task getGoBinData(type: Exec) { executable = 'go' args = ['get', '-u', 'github.com/jteeuwen/go-bindata/...'] @@ -239,34 +183,9 @@ task goI18n(type: Exec) { } /* - I18n support - */ -// task getGoI18n(type: com.github.blindpirate.gogradle.Go) { -// go 'get -u github.com/jteeuwen/go-bindata/...' -// } - -// task goI18n(type: com.github.blindpirate.gogradle.Go) { -// // WARNING: The single quotes are intentional! The gogradle plugin will -// // parse the command with the GString engine at execution time. -// dependsOn 'getGoI18n' -// run '${GOPATH}/bin/go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources' -// } - -//resolveBuildDependencies.dependsOn(goI18n) - -/* - Checks -- add golint and scancode to the checks run prior to build. + Checks -- add golint to the checks run prior to build. The get step is needed to be sure a golint binary is available to run. */ -// task getGoLint(type: com.github.blindpirate.gogradle.Go) { -// go 'get -u golang.org/x/lint/golint' -// } - -// task goLint(type: com.github.blindpirate.gogradle.Go, dependsOn: getGoLint) { -// // WARNING: The single quotes are intentional! The gogradle plugin will -// // parse the command with the GString engine at execution time. -// run '${GOPATH}/bin/golint ' + golang.packagePath -// } task getGoLint(type: Exec) { executable = 'go' From ef6f42e209848b0888ea82917e8f06535801946c Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 18:36:18 -0600 Subject: [PATCH 08/22] Fix golint command --- build.gradle | 19 ++++++++++++------- go.mod | 13 +++++++++---- go.sum | 39 ++++++++++++++++++++++++++++++++------- 3 files changed, 53 insertions(+), 18 deletions(-) diff --git a/build.gradle b/build.gradle index fec7c8e29..278713d66 100644 --- a/build.gradle +++ b/build.gradle @@ -167,9 +167,9 @@ task getGoBinData(type: Exec) { executable = 'go' args = ['get', '-u', 'github.com/jteeuwen/go-bindata/...'] - doLast{ - println commandLine - } + // doLast{ + // println commandLine + // } } task goI18n(type: Exec) { @@ -177,9 +177,9 @@ task goI18n(type: Exec) { executable = 'go-bindata' args = ['-pkg', 'wski18n', '-o', 'wski18n/i18n_resources.go', 'wski18n/resources'] - doLast{ - println commandLine - } + // doLast{ + // println commandLine + // } } /* @@ -193,9 +193,14 @@ task getGoLint(type: Exec) { } task goLint(type: Exec) { + dependsOn 'getGoLint' executable = 'golint' - args = [golang.packagePath] + args = ['./commands/'] + + // doLast{ + // println commandLine + // } } goCheck.dependsOn(goLint) diff --git a/go.mod b/go.mod index 5f96b4aed..641973f94 100644 --- a/go.mod +++ b/go.mod @@ -8,16 +8,21 @@ require ( github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 github.com/fatih/color v1.9.0 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 - github.com/google/go-querystring v1.0.0 // indirect - github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e // indirect + github.com/google/go-querystring v1.0.0 + github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e + github.com/inconshreveable/mousetrap v1.0.0 github.com/mattn/go-colorable v0.1.7 + github.com/mattn/go-isatty v0.0.12 github.com/mitchellh/go-homedir v1.1.0 github.com/nicksnyder/go-i18n v1.10.1 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/pelletier/go-toml v1.8.0 // indirect github.com/spf13/cobra v1.0.0 - github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.6.1 - golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a // indirect + golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect + golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 + golang.org/x/tools v0.1.0 // indirect + gopkg.in/yaml.v2 v2.3.0 ) diff --git a/go.sum b/go.sum index 2c6881548..fd2a7c26e 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,4 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -8,6 +7,8 @@ github.com/apache/openwhisk-client-go v0.0.0-20191018191012-ee5b8709787c h1:HJim github.com/apache/openwhisk-client-go v0.0.0-20191018191012-ee5b8709787c/go.mod h1:jLLKYP7+1+LFlIJW1n9U1gqeveLM1HIwa4ZHNOFxjPw= github.com/apache/openwhisk-client-go v0.0.0-20200824013630-44551f1f3b71 h1:yTMBqN5j2u/nnwjR+MtegLSfExN5s1O7EAyZ3XS7PR8= github.com/apache/openwhisk-client-go v0.0.0-20200824013630-44551f1f3b71/go.mod h1:jLLKYP7+1+LFlIJW1n9U1gqeveLM1HIwa4ZHNOFxjPw= +github.com/apache/openwhisk-wskdeploy v0.0.0-20200526130153-26308cad60c9 h1:554nLEpjcUQaSw1C6pHz6YuDxtcqG3pveBwWZ3OI67k= +github.com/apache/openwhisk-wskdeploy v0.0.0-20200526130153-26308cad60c9/go.mod h1:11PhGZEWM97VMRcnLrA158QuLEwmZS93SvB1kChGm1Y= github.com/apache/openwhisk-wskdeploy v0.0.0-20200827195556-535f5a9d3942 h1:SDeUi5Wqtv2J/4FkbjyZ3pCEMfy88DMTQix+qmAjo9I= github.com/apache/openwhisk-wskdeploy v0.0.0-20200827195556-535f5a9d3942/go.mod h1:jRNFwq0Ribf74Jd7oYvoDtBH+RXb5nCVAIHji47ESjY= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -55,13 +56,11 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= -github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v0.0.0-20160401233042-9235644dd9e5 h1:oERTZ1buOUYlpmKaqlO5fYmz8cZ1rYu5DieJzF4ZVmU= github.com/google/go-querystring v0.0.0-20160401233042-9235644dd9e5/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -86,10 +85,8 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.7.1-0.20160908093658-0723e352fa35/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -98,6 +95,8 @@ github.com/mattn/go-colorable v0.0.7/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c h1:3nKFouDdpgGUV/uerJcYWH45ZbJzX0SiVWfTgmUeTzc= +github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= @@ -172,26 +171,40 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20161108151328-9a2e24c3733e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -199,6 +212,7 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -209,18 +223,31 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443 h1:X18bCaipMcoJGm27Nv7zr4XYPKGUy92GtqboKC2Hxaw= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a h1:i47hUS795cOydZI4AwJQCKXOr4BvxzvikwDoDtHhP2Y= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -230,11 +257,9 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= -google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= From 1d6ad1e808733a3bf44314a8479b2593ecb9c46f Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 18:44:40 -0600 Subject: [PATCH 09/22] Fix golint command --- build.gradle | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/build.gradle b/build.gradle index 278713d66..9247cbe27 100644 --- a/build.gradle +++ b/build.gradle @@ -193,14 +193,9 @@ task getGoLint(type: Exec) { } task goLint(type: Exec) { - - dependsOn 'getGoLint' executable = 'golint' - args = ['./commands/'] - - // doLast{ - // println commandLine - // } + //args = ['.', './commands/'] + args = ['.'] } goCheck.dependsOn(goLint) From 40c18984483c7bb4011b6b49c5f6de832b01181d Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 20:11:54 -0600 Subject: [PATCH 10/22] Fix golint command --- build.gradle | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 9247cbe27..18d560e5d 100644 --- a/build.gradle +++ b/build.gradle @@ -167,9 +167,9 @@ task getGoBinData(type: Exec) { executable = 'go' args = ['get', '-u', 'github.com/jteeuwen/go-bindata/...'] - // doLast{ - // println commandLine - // } + doLast{ + println commandLine + } } task goI18n(type: Exec) { @@ -177,9 +177,9 @@ task goI18n(type: Exec) { executable = 'go-bindata' args = ['-pkg', 'wski18n', '-o', 'wski18n/i18n_resources.go', 'wski18n/resources'] - // doLast{ - // println commandLine - // } + doLast{ + println commandLine + } } /* @@ -190,12 +190,20 @@ task goI18n(type: Exec) { task getGoLint(type: Exec) { executable = 'go' args = ['get', '-u', 'golang.org/x/lint/golint'] + + doLast{ + println commandLine + } } task goLint(type: Exec) { executable = 'golint' - //args = ['.', './commands/'] - args = ['.'] + //args = ['./', './commands/'] + args = ['./'] + + doLast{ + println commandLine + } } goCheck.dependsOn(goLint) From 010afa3646809720d7cbcd99ea569a281a07ec0c Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 20:24:34 -0600 Subject: [PATCH 11/22] Use latest go.mod --- go.mod | 13 ++++--------- go.sum | 39 +++++++-------------------------------- 2 files changed, 11 insertions(+), 41 deletions(-) diff --git a/go.mod b/go.mod index 641973f94..5f96b4aed 100644 --- a/go.mod +++ b/go.mod @@ -8,21 +8,16 @@ require ( github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 github.com/fatih/color v1.9.0 github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 - github.com/google/go-querystring v1.0.0 - github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e - github.com/inconshreveable/mousetrap v1.0.0 + github.com/google/go-querystring v1.0.0 // indirect + github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e // indirect github.com/mattn/go-colorable v0.1.7 - github.com/mattn/go-isatty v0.0.12 github.com/mitchellh/go-homedir v1.1.0 github.com/nicksnyder/go-i18n v1.10.1 github.com/onsi/ginkgo v1.14.0 github.com/onsi/gomega v1.10.1 github.com/pelletier/go-toml v1.8.0 // indirect github.com/spf13/cobra v1.0.0 - github.com/spf13/pflag v1.0.5 + github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.6.1 - golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 - golang.org/x/tools v0.1.0 // indirect - gopkg.in/yaml.v2 v2.3.0 + golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a // indirect ) diff --git a/go.sum b/go.sum index fd2a7c26e..2c6881548 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,5 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -7,8 +8,6 @@ github.com/apache/openwhisk-client-go v0.0.0-20191018191012-ee5b8709787c h1:HJim github.com/apache/openwhisk-client-go v0.0.0-20191018191012-ee5b8709787c/go.mod h1:jLLKYP7+1+LFlIJW1n9U1gqeveLM1HIwa4ZHNOFxjPw= github.com/apache/openwhisk-client-go v0.0.0-20200824013630-44551f1f3b71 h1:yTMBqN5j2u/nnwjR+MtegLSfExN5s1O7EAyZ3XS7PR8= github.com/apache/openwhisk-client-go v0.0.0-20200824013630-44551f1f3b71/go.mod h1:jLLKYP7+1+LFlIJW1n9U1gqeveLM1HIwa4ZHNOFxjPw= -github.com/apache/openwhisk-wskdeploy v0.0.0-20200526130153-26308cad60c9 h1:554nLEpjcUQaSw1C6pHz6YuDxtcqG3pveBwWZ3OI67k= -github.com/apache/openwhisk-wskdeploy v0.0.0-20200526130153-26308cad60c9/go.mod h1:11PhGZEWM97VMRcnLrA158QuLEwmZS93SvB1kChGm1Y= github.com/apache/openwhisk-wskdeploy v0.0.0-20200827195556-535f5a9d3942 h1:SDeUi5Wqtv2J/4FkbjyZ3pCEMfy88DMTQix+qmAjo9I= github.com/apache/openwhisk-wskdeploy v0.0.0-20200827195556-535f5a9d3942/go.mod h1:jRNFwq0Ribf74Jd7oYvoDtBH+RXb5nCVAIHji47ESjY= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -56,11 +55,13 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-querystring v0.0.0-20160401233042-9235644dd9e5 h1:oERTZ1buOUYlpmKaqlO5fYmz8cZ1rYu5DieJzF4ZVmU= github.com/google/go-querystring v0.0.0-20160401233042-9235644dd9e5/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -85,8 +86,10 @@ github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvW github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/magiconair/properties v1.7.1-0.20160908093658-0723e352fa35/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= @@ -95,8 +98,6 @@ github.com/mattn/go-colorable v0.0.7/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaO github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c h1:3nKFouDdpgGUV/uerJcYWH45ZbJzX0SiVWfTgmUeTzc= -github.com/mattn/go-isatty v0.0.0-20160806122752-66b8e73f3f5c/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= @@ -171,40 +172,26 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= -golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20161108151328-9a2e24c3733e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -212,7 +199,6 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -223,31 +209,18 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443 h1:X18bCaipMcoJGm27Nv7zr4XYPKGUy92GtqboKC2Hxaw= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a h1:i47hUS795cOydZI4AwJQCKXOr4BvxzvikwDoDtHhP2Y= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -257,9 +230,11 @@ google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= From 01fe01ab218ae716646ffb5e5d7d295554e591ec Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 20:47:04 -0600 Subject: [PATCH 12/22] Use latest go.mod --- build.gradle | 19 ++++++++++++++++++- go.mod | 1 + go.sum | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 18d560e5d..7ad87d5ff 100644 --- a/build.gradle +++ b/build.gradle @@ -163,7 +163,19 @@ if (rootProject.hasProperty('buildPlatforms')) { /* I18n support */ + + task getGoPath(type: Exec) { + executable = 'echo' + args = ["$System.env.GOPATH"] + + doLast{ + println commandLine + } +} + + task getGoBinData(type: Exec) { + dependsOn 'getGoPath' executable = 'go' args = ['get', '-u', 'github.com/jteeuwen/go-bindata/...'] @@ -173,8 +185,13 @@ task getGoBinData(type: Exec) { } task goI18n(type: Exec) { + doLast{ + println "goI18n" + } + dependsOn 'getGoBinData' - executable = 'go-bindata' + executable = "$System.env.GOPATH" + '/bin/go-bindata' + // run '${GOPATH}/bin/go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources' args = ['-pkg', 'wski18n', '-o', 'wski18n/i18n_resources.go', 'wski18n/resources'] doLast{ diff --git a/go.mod b/go.mod index 5f96b4aed..e5ef74fb3 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/google/go-querystring v1.0.0 // indirect github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e // indirect + github.com/jteeuwen/go-bindata v3.0.7+incompatible // indirect github.com/mattn/go-colorable v0.1.7 github.com/mitchellh/go-homedir v1.1.0 github.com/nicksnyder/go-i18n v1.10.1 diff --git a/go.sum b/go.sum index 2c6881548..8815687fd 100644 --- a/go.sum +++ b/go.sum @@ -81,6 +81,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jteeuwen/go-bindata v3.0.7+incompatible h1:91Uy4d9SYVr1kyTJ15wJsog+esAZZl7JmEfTkwmhJts= +github.com/jteeuwen/go-bindata v3.0.7+incompatible/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= From 6ee4c4b150373ddb14ab58d23ea9ed3d8f71786f Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Thu, 25 Feb 2021 20:47:25 -0600 Subject: [PATCH 13/22] Use latest go.mod --- go.mod | 1 - go.sum | 2 -- 2 files changed, 3 deletions(-) diff --git a/go.mod b/go.mod index e5ef74fb3..5f96b4aed 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,6 @@ require ( github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/google/go-querystring v1.0.0 // indirect github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e // indirect - github.com/jteeuwen/go-bindata v3.0.7+incompatible // indirect github.com/mattn/go-colorable v0.1.7 github.com/mitchellh/go-homedir v1.1.0 github.com/nicksnyder/go-i18n v1.10.1 diff --git a/go.sum b/go.sum index 8815687fd..2c6881548 100644 --- a/go.sum +++ b/go.sum @@ -81,8 +81,6 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jteeuwen/go-bindata v3.0.7+incompatible h1:91Uy4d9SYVr1kyTJ15wJsog+esAZZl7JmEfTkwmhJts= -github.com/jteeuwen/go-bindata v3.0.7+incompatible/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= From 222027e9a1c4655013cd44dd0fda7f3365b6cc7e Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Fri, 26 Feb 2021 10:12:54 -0600 Subject: [PATCH 14/22] Remove goVet and gofmt tasks as they use older go conventions --- build.gradle | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/build.gradle b/build.gradle index 7ad87d5ff..2ceefc09b 100644 --- a/build.gradle +++ b/build.gradle @@ -34,6 +34,20 @@ subprojects { scalafmt.configFilePath = gradle.scalafmt.config } +golang { + packagePath = 'github.com/apache/openwhisk-cli' as String + buildTags = (rootProject.findProperty('goTags')?:'').split(',') +} + +// The `gogradle` plugin was designed to work with `govendor` and `godeps` tools +// We must disable its tasks that attempt to "fetch" dependencies +// into a "/vendor" directory and use them to build the project (which will fail) +installDependencies.enabled = false +resolveBuildDependencies.enabled = false +resolveTestDependencies.enabled = false +goVet.enabled = false +gofmt.enabled = false + /* The OpenWhiskPlatform class is a utility class to make the rest of what happens with platforms a bit more understandable. A "Platform" is a tuple From 5c98ad65c18110b2ca20b133e62bb96f59345737 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Fri, 26 Feb 2021 11:24:48 -0600 Subject: [PATCH 15/22] Remove goVet and gofmt tasks as they use older go conventions --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 2ceefc09b..2a153ce37 100644 --- a/build.gradle +++ b/build.gradle @@ -228,6 +228,7 @@ task getGoLint(type: Exec) { } task goLint(type: Exec) { + dependsOn 'getGoLint' executable = 'golint' //args = ['./', './commands/'] args = ['./'] From db19bf93f2894613540870e8c61a6fb94ab5251f Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Fri, 26 Feb 2021 12:57:31 -0600 Subject: [PATCH 16/22] Remove failing localhost/SDK scala tests --- build.gradle | 2 ++ go.mod | 4 ++- go.sum | 31 +++++++++++++++++++ .../test/scala/system/basic/WskSdkTests.scala | 2 ++ tools/travis/test_openwhisk.sh | 4 +-- 5 files changed, 40 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 2a153ce37..34ed73edb 100644 --- a/build.gradle +++ b/build.gradle @@ -45,6 +45,8 @@ golang { installDependencies.enabled = false resolveBuildDependencies.enabled = false resolveTestDependencies.enabled = false + +// Disable "go vet" and "gofmt" as gogradle uses deprecated syntax goVet.enabled = false gofmt.enabled = false diff --git a/go.mod b/go.mod index 5f96b4aed..a598a751a 100644 --- a/go.mod +++ b/go.mod @@ -10,6 +10,7 @@ require ( github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32 github.com/google/go-querystring v1.0.0 // indirect github.com/hokaccha/go-prettyjson v0.0.0-20190818114111-108c894c2c0e // indirect + github.com/jteeuwen/go-bindata v3.0.7+incompatible // indirect github.com/mattn/go-colorable v0.1.7 github.com/mitchellh/go-homedir v1.1.0 github.com/nicksnyder/go-i18n v1.10.1 @@ -19,5 +20,6 @@ require ( github.com/spf13/cobra v1.0.0 github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.6.1 - golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a // indirect + golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect + golang.org/x/tools v0.1.0 // indirect ) diff --git a/go.sum b/go.sum index 2c6881548..3b1bcab0d 100644 --- a/go.sum +++ b/go.sum @@ -81,6 +81,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jteeuwen/go-bindata v3.0.7+incompatible h1:91Uy4d9SYVr1kyTJ15wJsog+esAZZl7JmEfTkwmhJts= +github.com/jteeuwen/go-bindata v3.0.7+incompatible/go.mod h1:JVvhzYOiGBnFSYRyV00iY8q7/0PThjIYav1p9h5dmKs= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -172,26 +174,40 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -199,6 +215,7 @@ golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -211,16 +228,30 @@ golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a h1:i47hUS795cOydZI4AwJQCKXOr4BvxzvikwDoDtHhP2Y= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= diff --git a/tests/src/test/scala/system/basic/WskSdkTests.scala b/tests/src/test/scala/system/basic/WskSdkTests.scala index e2280e777..219263f6d 100644 --- a/tests/src/test/scala/system/basic/WskSdkTests.scala +++ b/tests/src/test/scala/system/basic/WskSdkTests.scala @@ -40,6 +40,7 @@ class WskSdkTests extends TestHelpers with WskTestHelpers { behavior of "Wsk SDK" +/* it should "prefix https to apihost if no scheme given" in { val result = wsk.cli(Seq("--apihost", "localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) result.stderr should include regex ("""(?i)Get https://localhost:54321/""") @@ -56,6 +57,7 @@ class WskSdkTests extends TestHelpers with WskTestHelpers { wsk.cli(Seq("--apihost", "https://localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) result.stderr should include regex ("""(?i)Get https://localhost:54321/""") } +*/ it should "download docker action sdk" in { val dir = File.createTempFile("wskinstall", ".tmp") diff --git a/tools/travis/test_openwhisk.sh b/tools/travis/test_openwhisk.sh index aa0e9e4eb..ca4780dab 100755 --- a/tools/travis/test_openwhisk.sh +++ b/tools/travis/test_openwhisk.sh @@ -83,7 +83,7 @@ cd $TRAVIS_BUILD_DIR cd $OPENWHISK_HOME # Install Ansible and other pre-reqs -./tools/travis/setup.sh +#./tools/travis/setup.sh # Fire up the cluster ANSIBLE_CMD="ansible-playbook -i environments/local -e docker_image_prefix=openwhisk -e docker_image_tag=nightly" @@ -92,10 +92,10 @@ $ANSIBLE_CMD setup.yml $ANSIBLE_CMD prereq.yml $ANSIBLE_CMD couchdb.yml $ANSIBLE_CMD initdb.yml -$ANSIBLE_CMD apigateway.yml $ANSIBLE_CMD wipe.yml $ANSIBLE_CMD openwhisk.yml -e cli_tag=$openwhisk_cli_tag -e cli_installation_mode=local -e openwhisk_cli_home=$TRAVIS_BUILD_DIR -e controllerProtocolForSetup=http $ANSIBLE_CMD properties.yml +$ANSIBLE_CMD apigateway.yml $ANSIBLE_CMD routemgmt.yml # Run the test cases under openwhisk to ensure the quality of the runnint API. From 3a4adb83faffa9075ec2e605241e1a105e829cab Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Fri, 26 Feb 2021 15:21:07 -0600 Subject: [PATCH 17/22] Try some regex fixes for scala SDK tests --- .gitignore | 4 ++++ .../test/scala/system/basic/WskSdkTests.scala | 16 +++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index ed14c6965..955900b92 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ Godeps/ *~ # IDE-related exclusions +/.vscode/ .idea/ *.iml @@ -23,5 +24,8 @@ bin/ tests/build/ tests/out/ +# Scala +/.metals/ + # Exmaples and Misc javascript/ diff --git a/tests/src/test/scala/system/basic/WskSdkTests.scala b/tests/src/test/scala/system/basic/WskSdkTests.scala index 219263f6d..74472ca9f 100644 --- a/tests/src/test/scala/system/basic/WskSdkTests.scala +++ b/tests/src/test/scala/system/basic/WskSdkTests.scala @@ -40,24 +40,22 @@ class WskSdkTests extends TestHelpers with WskTestHelpers { behavior of "Wsk SDK" -/* it should "prefix https to apihost if no scheme given" in { val result = wsk.cli(Seq("--apihost", "localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) - result.stderr should include regex ("""(?i)Get https://localhost:54321/""") + result.stderr should include regex ("""(?i)Get "https://localhost:54321/""") } it should "not prefix https to http apihost" in { val result = wsk.cli(Seq("--apihost", "http://localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) - result.stderr should include regex ("""(?i)Get http://localhost:54321/""") + result.stderr should include regex ("""(?i)Get \"http://localhost:54321/""") } - it should "not double prefix https to https apihost" in { - val result = - wsk.cli(Seq("--apihost", "https://localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) - result.stderr should include regex ("""(?i)Get https://localhost:54321/""") - } -*/ + // it should "not double prefix https to https apihost" in { + // val result = + // wsk.cli(Seq("--apihost", "https://localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) + // result.stderr should include regex ("""(?i)Get https://localhost:54321/""") + // } it should "download docker action sdk" in { val dir = File.createTempFile("wskinstall", ".tmp") From 3ea91727036630a21bee9ff3d984b7bec8406599 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Fri, 26 Feb 2021 17:03:11 -0600 Subject: [PATCH 18/22] Fix regex for SDK scala tests; Remove govendor from README --- README.md | 78 +++++-------------- build.gradle | 20 ++--- .../test/scala/system/basic/WskSdkTests.scala | 14 ++-- 3 files changed, 32 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index 0c153d4cc..5af8d92e0 100644 --- a/README.md +++ b/README.md @@ -24,36 +24,24 @@ [![Join Slack](https://img.shields.io/badge/join-slack-9B69A0.svg)](http://slack.openwhisk.org/) [![Twitter](https://img.shields.io/twitter/follow/openwhisk.svg?style=social&logo=twitter)](https://twitter.com/intent/follow?screen_name=openwhisk) -OpenWhisk Command-line Interface (CLI) is a unified tool that -provides a consistent interface to interact with OpenWhisk services. +OpenWhisk Command-line Interface (CLI) is a unified tool that provides a consistent interface to interact with OpenWhisk services. # Where to download the binary of OpenWhisk CLI -The OpenWhisk CLI is available on the [releases page](https://github.com/apache/openwhisk-cli/releases). We -currently have binaries available for Linux, Mac OS and Windows under i386 and -amd64 architectures. Linux versions are also available under Linux on Z, Power -and 64-bit ARM architectures. You can download the binary, which fits your -local environment. +The OpenWhisk CLI is available on the [releases page](https://github.com/apache/openwhisk-cli/releases). We currently have binaries available for Linux, Mac OS and Windows under i386 and amd64 architectures. Linux versions are also available under Linux on Z, Power and 64-bit ARM architectures. You can download the binary, which fits your local environment. # How to build the binary locally -The OpenWhisk CLI is written in the Go language. You have two options to build -the binary locally: +The OpenWhisk CLI is written in the Go language. You have two options to build the binary locally: 1. Build using the packaged Gradle scripts (including the 'gogradle' plugin) now the preferred build method. 2. Compile in your local Go environment ## Build the binary with Gradle -**Note:** For those who may have used the Gradle build previously, it has been -re-engineered to no longer required Docker or Go to be pre-installed on your -system. Using the [gogradle](https://github.com/gogradle/gogradle) plugin, -Gradle now uses a preexisting Go environment to build if it can be located, or -downloads and installs an environment within the build directory. +**Note:** Gradle builds no longer required Docker or Go to be pre-installed on your system. Using the [gogradle](https://github.com/gogradle/gogradle) plugin, Gradle now uses a preexisting Go environment to build if it can be located, or downloads and installs an environment within the build directory. -To build with Gradle, open an terminal, go to the directory of OpenWhisk CLI -home directory, and build the binary via the following command under Linux or -Mac: +To build with Gradle, open an terminal, go to the directory of OpenWhisk CLI home directory, and build the binary via the following command under Linux or Mac: ``` $ ./gradlew compile -PnativeCompile @@ -65,14 +53,11 @@ or run the following command for Windows: $ ./gradlew.bat compile -PnativeCompile ``` -After the build, you can find the binary `wsk` or `wsk.exe` in the build folder -under the OpenWhisk CLI home directory. In addition, it is also available under -the folder `build/-/`. For example, if your local operating -system is Mac, and the CPU architecture is amd64, the binary can be found at -`build/mac-amd64/wsk` and `build/mac`. +After the build, you can find the binary `wsk` or `wsk.exe` in the build folder under the OpenWhisk CLI home directory. In addition, it is also available under the folder `build/-/`. -If you would like to build the binaries available for all the operating systems -and architectures, run the following command: +For example, if your local operating system is Mac, and the CPU architecture is amd64, the binary can be found at `build/mac-amd64/wsk` and `build/mac`. + +If you would like to build the binaries available for all the operating systems and architectures, run the following command: ``` $ ./gradlew compile @@ -102,53 +87,32 @@ $ ./gradlew goTest -PgoTags=unit $ ./gradlew goTest -PgoTags=native ``` -Integration tests are best left to the Travis build as they depend on a fully -functional OpenWhisk environment. +Integration tests are best left to the Travis build as they depend on a fully functional OpenWhisk environment. ## Compile the binary using your local Go environment -Make sure that you have [Go installed](https://golang.org/doc/install), and `$GOPATH` is defined in your [Go development -environment](https://golang.org/doc/code.html). +Make sure that you have [Go installed](https://golang.org/doc/install), and `$GOPATH` is defined in your [Go development environment](https://golang.org/doc/code.html). -Then download the source code of the OpenWhisk CLI and the dependencies by -typing: +Then download the source code of the OpenWhisk CLI and the dependencies by typing: ``` -$ cd $GOPATH $ go get github.com/apache/openwhisk-cli $ cd $GOPATH/src/github.com/apache/openwhisk-cli ``` -The CLI internationalization should be generated dynamically using the -bindata tool: +The CLI internationalization is generated dynamically using the `bindata` tool as part of the gradle build. If you need to install it manually, you may use: ``` $ go get -u github.com/jteeuwen/go-bindata/... $ go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources ``` -The project includes a `vendor/vendor.json` and you can lock down -dependencies for a clean build of the CLI by populating the `vendor` folder. - -``` -$ go get -u github.com/kardianos/govendor # Install govendor tool -$ govendor sync # Download and install packages with specified dependencies. -``` - -NOTE: As a temporary workaround, you have to remove a redundant instance of `spf13/cobra` -in the vendor folder. See this [issue](https://github.com/apache/openwhisk-cli/issues/398) for details. -``` -$ rm -rf vendor/github.com/spf13 -``` - Now you can build the binary. ``` $ go build -o wsk ``` -If you would like to build the binary for a specific operating system, you may -add the arguments `GOOS` and `GOARCH` into the Go build command. `GOOS` can -be set to `linux`, `darwin`, or `windows`. +If you would like to build the binary for a specific operating system, you may add the arguments `GOOS` and `GOARCH` into the Go build command. `GOOS` can be set to `linux`, `darwin`, or `windows`. For example, run the following command to build the binary for Linux: @@ -156,8 +120,7 @@ For example, run the following command to build the binary for Linux: $ GOOS=linux GOARCH=amd64 go build -o wsk-$GOOS-$GOARCH ``` -If it is executed successfully, you can find your binary `wsk` directly under -OpenWhisk CLI home directory. +If it is executed successfully, you can find your binary `wsk` directly under OpenWhisk CLI home directory. You can run unit tests as well (although note the majority of the tests today are not in Go). @@ -169,20 +132,15 @@ $ go test -tags=unit -v # How to use the binary -When you have the binary, you can copy the binary to any folder, and add folder -into the system PATH in order to run the OpenWhisk CLI command. To get the CLI -command help, execute the following command: +When you have the binary, you can copy the binary to any folder, and add folder into the system PATH in order to run the OpenWhisk CLI command. To get the CLI command help, execute the following command: ``` $ wsk --help ``` -To get CLI command debug information, include the `-d`, or `--debug` flag when -executing this command. +To get CLI command debug information, include the `-d`, or `--debug` flag when executing this command. # Continuous Integration -Travis CI is used as a continuous delivery service for Linux and Mac. -Currently Travis CI supports the environments of Linux and Mac, -but it is not available for Windows. We will add support of AppVeyor CI in +Travis CI is used as a continuous delivery service for Linux and Mac. Currently Travis CI supports the environments of Linux and Mac, but it is not available for Windows. We will add support of AppVeyor CI in future to run test cases and build the binary for Windows. diff --git a/build.gradle b/build.gradle index 34ed73edb..dde0a2fcf 100644 --- a/build.gradle +++ b/build.gradle @@ -180,18 +180,16 @@ if (rootProject.hasProperty('buildPlatforms')) { I18n support */ - task getGoPath(type: Exec) { - executable = 'echo' - args = ["$System.env.GOPATH"] - - doLast{ - println commandLine - } -} +// task getGoPath(type: Exec) { +// executable = 'echo' +// args = ["$System.env.GOPATH"] +// doLast{ +// println commandLine +// } +// } task getGoBinData(type: Exec) { - dependsOn 'getGoPath' executable = 'go' args = ['get', '-u', 'github.com/jteeuwen/go-bindata/...'] @@ -201,10 +199,6 @@ task getGoBinData(type: Exec) { } task goI18n(type: Exec) { - doLast{ - println "goI18n" - } - dependsOn 'getGoBinData' executable = "$System.env.GOPATH" + '/bin/go-bindata' // run '${GOPATH}/bin/go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources' diff --git a/tests/src/test/scala/system/basic/WskSdkTests.scala b/tests/src/test/scala/system/basic/WskSdkTests.scala index 74472ca9f..cd83b6dca 100644 --- a/tests/src/test/scala/system/basic/WskSdkTests.scala +++ b/tests/src/test/scala/system/basic/WskSdkTests.scala @@ -42,20 +42,20 @@ class WskSdkTests extends TestHelpers with WskTestHelpers { it should "prefix https to apihost if no scheme given" in { val result = wsk.cli(Seq("--apihost", "localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) - result.stderr should include regex ("""(?i)Get "https://localhost:54321/""") + result.stderr should include regex ("""(?i)Get [\"]https://localhost:54321/""") } it should "not prefix https to http apihost" in { val result = wsk.cli(Seq("--apihost", "http://localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) - result.stderr should include regex ("""(?i)Get \"http://localhost:54321/""") + result.stderr should include regex ("""(?i)Get [\"]http://localhost:54321/""") } - // it should "not double prefix https to https apihost" in { - // val result = - // wsk.cli(Seq("--apihost", "https://localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) - // result.stderr should include regex ("""(?i)Get https://localhost:54321/""") - // } + it should "not double prefix https to https apihost" in { + val result = + wsk.cli(Seq("--apihost", "https://localhost:54321", "sdk", "install", "docker"), expectedExitCode = ERROR_EXIT) + result.stderr should include regex ("""(?i)Get [\"]https://localhost:54321/""") + } it should "download docker action sdk" in { val dir = File.createTempFile("wskinstall", ".tmp") From 5983220600f13afe8a3f3932bbdbc959ec0c4375 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Mon, 1 Mar 2021 14:53:02 -0600 Subject: [PATCH 19/22] Revamp README to reflect current Go mod and Gradle build instructions --- .gitignore | 2 +- README.md | 179 +++++++++++++++++++++++++++++++++++++++++++++-------- go.mod | 5 +- go.sum | 17 ----- 4 files changed, 158 insertions(+), 45 deletions(-) diff --git a/.gitignore b/.gitignore index 955900b92..b831ede28 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,5 @@ tests/out/ # Scala /.metals/ -# Exmaples and Misc +# Misc javascript/ diff --git a/README.md b/README.md index 5af8d92e0..a3572e97f 100644 --- a/README.md +++ b/README.md @@ -26,39 +26,157 @@ OpenWhisk Command-line Interface (CLI) is a unified tool that provides a consistent interface to interact with OpenWhisk services. -# Where to download the binary of OpenWhisk CLI +--- -The OpenWhisk CLI is available on the [releases page](https://github.com/apache/openwhisk-cli/releases). We currently have binaries available for Linux, Mac OS and Windows under i386 and amd64 architectures. Linux versions are also available under Linux on Z, Power and 64-bit ARM architectures. You can download the binary, which fits your local environment. +## Downloading released binaries -# How to build the binary locally +Binaries of the OpenWhisk CLI are available for download on the project's GitHub [releases page](https://github.com/apache/openwhisk-cli/releases). -The OpenWhisk CLI is written in the Go language. You have two options to build the binary locally: +We currently provide binaries for the following Operating Systems (OS) and architecture combinations: -1. Build using the packaged Gradle scripts (including the 'gogradle' plugin) now the preferred build method. -2. Compile in your local Go environment +Operating System | Architectures +--- | --- +Linux | i386, AMD64, ARM, ARM64, PPC64 (Power), S/390 and IBM Z +Mac OS (Darwin) | 386[1](#1), AMD64 +Windows | 386, AMD64 -## Build the binary with Gradle +1. Mac OS, 32-bit (386) released versions are not available for builds using Go lang version 1.15 and greater. -**Note:** Gradle builds no longer required Docker or Go to be pre-installed on your system. Using the [gogradle](https://github.com/gogradle/gogradle) plugin, Gradle now uses a preexisting Go environment to build if it can be located, or downloads and installs an environment within the build directory. +We also provide instructions on how to build your own binaries from source code using the `Go` tool. -To build with Gradle, open an terminal, go to the directory of OpenWhisk CLI home directory, and build the binary via the following command under Linux or Mac: +- See [Building the project](#building-the-project). +--- + +## Building the project + +### GoLang setup + +The Openwhisk CLI is a GoLang program so you will first need to [Download and install GoLang](https://golang.org/dl/) onto your local machine. + +> **Note** Go version 1.15 or higher is recommended + +Make sure your `$GOPATH` is defined correctly in your environment. For detailed setup of your GoLang development environment, please read [How to Write Go Code](https://golang.org/doc/code.html). + +### Download the source code from GitHub + +As the code is managed using GitHub, it is easiest to retrieve the code using the `git clone` command. + +if you just want to build the code and do not intend to be a Contributor, you can clone the latest code from the Apache repository: + +```sh +git clone git@github.com:apache/openwhisk-cli ``` -$ ./gradlew compile -PnativeCompile + +or you can specify a release (tag) if you do not want the latest code by using the `--branch ` flag. For example, you can clone the source code for the tagged 1.1.0 [release](https://github.com/apache/openwhisk-cli/releases/tag/1.1.0) + +```sh +git clone --branch 1.1.0 git@github.com:apache/openwhisk-clie ``` -or run the following command for Windows: +You can also pull the code from a fork of the repository. If you intend to become a Contributor to the project, read the section [Contributing to the project](#contributing-to-the-project) below on how to setup a fork. +### Build using `go build` + +Use the Go utility to build the ```wsk`` binary. + +Change into the cloned project directory and use `go build` with the target output name for the binary: + +```sh +$ go build -o wsk ``` -$ ./gradlew.bat compile -PnativeCompile + +an executable named `wsk` will be created in the project directory compatible with your current operating system and architecture. + +#### Building for other Operating Systems (GOOS) and Architectures (GOARCH) + +If you would like to build the binary for a specific operating system and processor architecture, you may add the arguments `GOOS` and `GOARCH` into the Go build command (as inline environment variables). + +For example, run the following command to build the binary for 64-bit Linux: + +```sh +$ GOOS=linux GOARCH=amd64 go build -o wsk ``` -After the build, you can find the binary `wsk` or `wsk.exe` in the build folder under the OpenWhisk CLI home directory. In addition, it is also available under the folder `build/-/`. +Supported value combinations include: + +`GOOS` | `GOARCH` +--- | --- +linux | 386 (32-bit), amd64 (64-bit), s390x (S/390, Z), ppc64le (Power), arm (32-bit), arm64 (64-bit) +darwin (Mac OS) | amd64 +windows | 386 (32-bit), amd64 (64-bit) + +### Build using Gradle + +The project includes its own packaged version of Gradle called Gradle Wrapper which is invoked using the `./gradlew` command on Linux/Unix/Mac or `gradlew.bat` on Windows. + +1. Gradle requires requires you to [install Java JDK version 8](https://gradle.org/install/) or higher + +1. Clone the `openwhisk-cli` repo: + + ```sh + git clone https://github.com/apache/openwhisk-cli + ``` + + and change into the project directory. + +1. Cross-compile binaries for all supported Operating Systems and Architectures: + + ```sh + ./gradlew goBuild + ``` -For example, if your local operating system is Mac, and the CPU architecture is amd64, the binary can be found at `build/mac-amd64/wsk` and `build/mac`. + Upon a successful build, the `wsk` binaries can be found within the under the corresponding `build/-/` folder of your project: -If you would like to build the binaries available for all the operating systems and architectures, run the following command: + ```sh + $ ls build + darwin-amd64 linux-amd64 linux-arm64 linux-s390x windows-amd64 + linux-386 linux-arm linux-ppc64le windows-386 + ``` +#### Compiling for a single OS/ARCH + +1. View gradle build tasks for supported Operating Systems and Architectures: + + ```sh + ./gradlew tasks + ``` + + you will see build tasks for supported OS/ARCH combinations: + + ```sh + Gogradle tasks + -------------- + buildDarwinAmd64 - Custom go task. + buildLinux386 - Custom go task. + buildLinuxAmd64 - Custom go task. + buildLinuxArm - Custom go task. + buildLinuxArm64 - Custom go task. + buildLinuxPpc64le - Custom go task. + buildLinuxS390x - Custom go task. + buildWindows386 - Custom go task. + buildWindowsAmd64 - Custom go task. + ``` + + > **Note**: The `buildWindows386` option is only supported on Golang versions less than 1.15. + +1. Build using one of these tasks, for example: + + ```sh + $ ./gradlew buildDarwinAmd64 + ``` + +#### Using your own local Gradle to build + +Alternatively, you can choose to [Install Gradle](https://gradle.org/install/), which you can use instead of Gradle Wrapper by using the `gradle` command instead of `gradlew`. If you wish to use you own Gradle, verify its version is `6.6` or higher: + +```sh +gradle -version +``` + +> **Note** If using your own local Gradle installation, use the `gradle` command instead of the `./gradlew` command in the build instructions below. + + ``` $ ./gradlew compile ``` @@ -80,15 +198,33 @@ $ ./gradlew compile -PbuildPlatforms=linux-amd64,mac-amd64,windows-amd64 The build library understands most representations of most Operating Systems. -Tests can be run using the Gradle script: +--> + +### Running unit tests + +##### Using Go + +```sh +$ cd commands +$ go test -tags=unit -v +``` + +> **Note** A large number of CLI tests today are not yet available as Go tests. + +##### Using gradle + +All tests can be run using the Gradle script: ``` $ ./gradlew goTest -PgoTags=unit $ ./gradlew goTest -PgoTags=native ``` +### Running integration tests + Integration tests are best left to the Travis build as they depend on a fully functional OpenWhisk environment. + ## Compile the binary using your local Go environment Make sure that you have [Go installed](https://golang.org/doc/install), and `$GOPATH` is defined in your [Go development environment](https://golang.org/doc/code.html). @@ -122,13 +258,7 @@ $ GOOS=linux GOARCH=amd64 go build -o wsk-$GOOS-$GOARCH If it is executed successfully, you can find your binary `wsk` directly under OpenWhisk CLI home directory. -You can run unit tests as well (although note the majority of the tests today are not in Go). - -```sh -$ cd commands -$ go get github.com/stretchr/testify/assert -$ go test -tags=unit -v -``` +--> # How to use the binary @@ -142,5 +272,4 @@ To get CLI command debug information, include the `-d`, or `--debug` flag when e # Continuous Integration -Travis CI is used as a continuous delivery service for Linux and Mac. Currently Travis CI supports the environments of Linux and Mac, but it is not available for Windows. We will add support of AppVeyor CI in -future to run test cases and build the binary for Windows. +Travis CI is used as a continuous delivery service for Linux and Mac. Currently Travis CI supports the environments of Linux and Mac, but it is not available for Windows. We will add support of AppVeyor CI in future to run test cases and build the binary for Windows. diff --git a/go.mod b/go.mod index a598a751a..20b994907 100644 --- a/go.mod +++ b/go.mod @@ -20,6 +20,7 @@ require ( github.com/spf13/cobra v1.0.0 github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.6.1 - golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 // indirect - golang.org/x/tools v0.1.0 // indirect + golang.org/x/net v0.0.0-20201021035429-f5854403a974 // indirect + golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect ) diff --git a/go.sum b/go.sum index 3b1bcab0d..d556757e1 100644 --- a/go.sum +++ b/go.sum @@ -174,22 +174,16 @@ github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3 h1:XQyxROzUlZH+WIQwySDgnISgOivlhjIEwaQaJEJrrN0= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= -golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -197,7 +191,6 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7 h1:AeiKBIuRw3UomYXSbLy0Mc2dDLfdtbT/IVn4keq83P0= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI= @@ -206,8 +199,6 @@ golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAG golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -226,8 +217,6 @@ golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a h1:i47hUS795cOydZI4AwJQCKXOr4BvxzvikwDoDtHhP2Y= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -242,12 +231,6 @@ golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd h1:/e+gpKk9r3dJobndpTytxS2gOy6m5uvpg+ISQoEcusQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= -golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= From 65b65c5b5590761db4fafa3a2810631880aaeab4 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Mon, 1 Mar 2021 15:59:42 -0600 Subject: [PATCH 20/22] Revamp README to reflect current Go mod and Gradle build instructions --- README.md | 111 +++++++++++++++++++++++++++--------------------------- 1 file changed, 55 insertions(+), 56 deletions(-) diff --git a/README.md b/README.md index a3572e97f..405bb45fd 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,20 @@ OpenWhisk Command-line Interface (CLI) is a unified tool that provides a consistent interface to interact with OpenWhisk services. +## Getting started + +Here are some quick links to help you get started: + +- [Downloading released binaries](#downloading-released-binaries) for Linux, Mac OS and Windows +- [Running the `wsk` CLI](#running-the-wsk-cli) executable +- [Building the project](#building-the-project) - download and build the GoLang source code +- [Contributing to the project](#contributing-to-the-project) - join us! + --- ## Downloading released binaries -Binaries of the OpenWhisk CLI are available for download on the project's GitHub [releases page](https://github.com/apache/openwhisk-cli/releases). +Executable binaries of the OpenWhisk CLI are available for download on the project's GitHub [releases page](https://github.com/apache/openwhisk-cli/releases). We currently provide binaries for the following Operating Systems (OS) and architecture combinations: @@ -42,9 +51,19 @@ Windows | 386, AMD64 1. Mac OS, 32-bit (386) released versions are not available for builds using Go lang version 1.15 and greater. -We also provide instructions on how to build your own binaries from source code using the `Go` tool. +We also provide instructions on how to build your own binaries from source code. See [Building the project](#building-the-project). + +--- + +## Running the `wsk` CLI + +You can copy the `wsk` binary to any folder, and add the folder to your system `PATH` in order to run the OpenWhisk CLI command from anywhere on your system. To get the CLI command help, execute the following: -- See [Building the project](#building-the-project). +``` +$ wsk --help +``` + +To get CLI command debug information, include the `-d`, or `--debug` flag when executing this command. --- @@ -98,6 +117,8 @@ For example, run the following command to build the binary for 64-bit Linux: $ GOOS=linux GOARCH=amd64 go build -o wsk ``` +If successful, an executable named `wsk` will be created in the project directory compatible with your current operating system and architecture. + Supported value combinations include: `GOOS` | `GOARCH` @@ -166,6 +187,9 @@ The project includes its own packaged version of Gradle called Gradle Wrapper wh $ ./gradlew buildDarwinAmd64 ``` +> **Note** You may use the `compile` Gradle task to build a subset of the supported platforms using the `buildPlatforms` parameter and supplying a comma-separated list, for example: +`-PbuildPlatforms=linux-amd64,mac-amd64,windows-amd64` + #### Using your own local Gradle to build Alternatively, you can choose to [Install Gradle](https://gradle.org/install/), which you can use instead of Gradle Wrapper by using the `gradle` command instead of `gradlew`. If you wish to use you own Gradle, verify its version is `6.6` or higher: @@ -176,29 +200,14 @@ gradle -version > **Note** If using your own local Gradle installation, use the `gradle` command instead of the `./gradlew` command in the build instructions below. - -``` -$ ./gradlew compile -``` - -The build script will place the binaries into the folder `build/-/` -for each operating system and CPU architecture pair. The build supports both -amd64 and 386 for Linux, Mac and Windows operating systems, as well as Power, -64-bit ARM, and S390X architectures for Linux. - -A binary compatible with the local architecture will be placed at `build/wsk` -(`build\wsk.exe` on Windows). +### Building for internationalization (i18n) -To specify a build for specific architectures, you can provide a comma or -space-delimited list of hyphenated os-architecture pairs, like this: +The CLI internationalization is generated dynamically using the `bindata` tool as part of the gradle build. If you need to install it manually, you may use: +```sh +$ go get -u github.com/jteeuwen/go-bindata/... +$ go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources ``` -$ ./gradlew compile -PbuildPlatforms=linux-amd64,mac-amd64,windows-amd64 -``` - -The build library understands most representations of most Operating Systems. - ---> ### Running unit tests @@ -224,52 +233,42 @@ $ ./gradlew goTest -PgoTags=native Integration tests are best left to the Travis build as they depend on a fully functional OpenWhisk environment. - -## Compile the binary using your local Go environment - -Make sure that you have [Go installed](https://golang.org/doc/install), and `$GOPATH` is defined in your [Go development environment](https://golang.org/doc/code.html). +--- -Then download the source code of the OpenWhisk CLI and the dependencies by typing: +--- -``` -$ go get github.com/apache/openwhisk-cli -$ cd $GOPATH/src/github.com/apache/openwhisk-cli -``` +## Contributing to the project -The CLI internationalization is generated dynamically using the `bindata` tool as part of the gradle build. If you need to install it manually, you may use: +### Git repository setup -``` -$ go get -u github.com/jteeuwen/go-bindata/... -$ go-bindata -pkg wski18n -o wski18n/i18n_resources.go wski18n/resources -``` +1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the Apache repository -Now you can build the binary. -``` -$ go build -o wsk -``` + If you intend to contribute code, you will want to fork the `apache/openwhisk-cli` repository into your github account and use that as the source for your clone. -If you would like to build the binary for a specific operating system, you may add the arguments `GOOS` and `GOARCH` into the Go build command. `GOOS` can be set to `linux`, `darwin`, or `windows`. +1. Clone the repository from your fork: -For example, run the following command to build the binary for Linux: + ```sh + git clone git@github.com:${GITHUB_ACCOUNT_USERNAME}/openwhisk-cli.git + ``` -``` -$ GOOS=linux GOARCH=amd64 go build -o wsk-$GOOS-$GOARCH -``` +1. Add the Apache repository as a remote with the `upstream` alias: -If it is executed successfully, you can find your binary `wsk` directly under OpenWhisk CLI home directory. + ```sh + git remote add upstream git@github.com:apache/openwhisk-cli + ``` ---> + You can now use `git push` to push local `commit` changes to your `origin` repository and submit pull requests to the `upstream` project repository. -# How to use the binary +1. Optionally, prevent accidental pushes to `upstream` using this command: -When you have the binary, you can copy the binary to any folder, and add folder into the system PATH in order to run the OpenWhisk CLI command. To get the CLI command help, execute the following command: + ```sh + git remote set-url --push upstream no_push + ``` -``` -$ wsk --help -``` +> Be sure to [Sync your fork](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) before starting any contributions to keep it up-to-date with the upstream repository. -To get CLI command debug information, include the `-d`, or `--debug` flag when executing this command. +--- -# Continuous Integration +## Continuous Integration -Travis CI is used as a continuous delivery service for Linux and Mac. Currently Travis CI supports the environments of Linux and Mac, but it is not available for Windows. We will add support of AppVeyor CI in future to run test cases and build the binary for Windows. +Travis CI is used as a continuous delivery service for Linux and Mac. Currently Travis CI supports the environments of Linux and Mac, but it is not available for Windows. The project would like to add AppVeyor CI in the future to run test cases for Windows. From 94939e781b55133261f9c3e42a70132e9078f505 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Mon, 1 Mar 2021 16:48:28 -0600 Subject: [PATCH 21/22] Revamp README to reflect current Go mod and Gradle build instructions --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 405bb45fd..fc8da89e3 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ The project includes its own packaged version of Gradle called Gradle Wrapper wh ./gradlew goBuild ``` - Upon a successful build, the `wsk` binaries can be found within the under the corresponding `build/-/` folder of your project: + Upon a successful build, the `wsk` binaries can be found under the corresponding `build/-/` folder of your project: ```sh $ ls build @@ -192,7 +192,7 @@ The project includes its own packaged version of Gradle called Gradle Wrapper wh #### Using your own local Gradle to build -Alternatively, you can choose to [Install Gradle](https://gradle.org/install/), which you can use instead of Gradle Wrapper by using the `gradle` command instead of `gradlew`. If you wish to use you own Gradle, verify its version is `6.6` or higher: +Alternatively, you can choose to [Install Gradle](https://gradle.org/install/), which you can use instead of Gradle Wrapper by using the `gradle` command instead of `gradlew`. If you wish to use your own Gradle, verify its version is `6.6` or higher: ```sh gradle -version @@ -235,8 +235,6 @@ Integration tests are best left to the Travis build as they depend on a fully fu --- ---- - ## Contributing to the project ### Git repository setup @@ -267,6 +265,54 @@ Integration tests are best left to the Travis build as they depend on a fully fu > Be sure to [Sync your fork](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/syncing-a-fork) before starting any contributions to keep it up-to-date with the upstream repository. +### Adding new dependencies + +Please use `go get` to add new dependencies to the `go.mod` file: + +```sh +go get github.com/project/libname@v1.2.0 +``` + +> Please avoid using commit hashes for referencing non-OpenWhisk libraries. + +### Removing unused dependencies + +Please us `go tidy` to remove any unused dependencies after any significant code changes: + +```sh +go mod tidy +``` + +### Updating dependency versions + +Although you might be tempted to edit the go.mod file directly, please use the recommended method of using the `go get` command: + +Using "latest" version: + +```sh +go get github.com/project/libname +``` + +Using a release tag: + +```sah +go get github.com/project/libname +``` + +Using a commit hash: + +```sh +go get github.com/project/libname@aee5cab1c +``` + +### Updating Go version + +Although you could edit the version directly in the go.mod file, it is better to use the `go edit` command: + +```sh +go mod edit -go=1.15 +``` + --- ## Continuous Integration From bc4961f30670591106b6cc0dd02f4db3dadb80f1 Mon Sep 17 00:00:00 2001 From: Matt Rutkowski Date: Mon, 1 Mar 2021 17:28:58 -0600 Subject: [PATCH 22/22] Revamp README to reflect current Go mod and Gradle build instructions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index fc8da89e3..a6e9c5fce 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ The project includes its own packaged version of Gradle called Gradle Wrapper wh #### Using your own local Gradle to build -Alternatively, you can choose to [Install Gradle](https://gradle.org/install/), which you can use instead of Gradle Wrapper by using the `gradle` command instead of `gradlew`. If you wish to use your own Gradle, verify its version is `6.6` or higher: +Alternatively, you can choose to [Install Gradle](https://gradle.org/install/) and use it instead of the project's Gradle Wrapper. If so, you would use the `gradle` command instead of `gradlew`. If you do elect to use your own Gradle, verify its version is `6.6` or higher: ```sh gradle -version