You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openserverless.apache.org by ms...@apache.org on 2024/07/18 19:27:07 UTC
(openserverless-cli) branch main updated (cb3187a -> 6a2a303)
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-cli.git
from cb3187a work-in-progress wsk and wskdeploy
new 3d727af patches for submodules
new 6a2a303 resources
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
README.md | 11 ++-
auth/login.go | 2 +-
auth/login_test.go | 2 +-
go.mod | 1 -
main.go | 6 +-
patches/.gitignore | 3 +-
patches/builtin_extra.go | 47 +++++-----
patches/gosh | Bin 3998109 -> 0 bytes
patches/i18n_resources.go | 215 +++++++++++++++++++++++++++++++++++++++++++++
patches/patch-wsk.sh | 45 ++++++----
patches/patch-wskdeploy.sh | 11 +--
patches/runtimes_extra.go | 2 +-
tools/sh | 2 +-
tools/wsk | 2 +-
tools/wskdeploy | 2 +-
15 files changed, 298 insertions(+), 53 deletions(-)
delete mode 100755 patches/gosh
create mode 100644 patches/i18n_resources.go
(openserverless-cli) 02/02: resources
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-cli.git
commit 6a2a303dc0bf3182a429f4634be1302c02e4fd97
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Thu Jul 18 21:26:43 2024 +0200
resources
---
patches/i18n_resources.go | 215 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 215 insertions(+)
diff --git a/patches/i18n_resources.go b/patches/i18n_resources.go
new file mode 100644
index 0000000..21a14e3
--- /dev/null
+++ b/patches/i18n_resources.go
@@ -0,0 +1,215 @@
+package wski18n
+
+import (
+ "bytes"
+ "compress/gzip"
+ "fmt"
+ "io"
+ "strings"
+)
+
+func bindata_read(data []byte, name string) ([]byte, error) {
+ gz, err := gzip.NewReader(bytes.NewBuffer(data))
+ if err != nil {
+ return nil, fmt.Errorf("Read %q: %v", name, err)
+ }
+
+ var buf bytes.Buffer
+ _, err = io.Copy(&buf, gz)
+ gz.Close()
+
+ if err != nil {
+ return nil, fmt.Errorf("Read %q: %v", name, err)
+ }
+
+ return buf.Bytes(), nil
+}
+
+var _wski18n_resources_de_de_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
+
+func wski18n_resources_de_de_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_de_de_all_json,
+ "wski18n/resources/de_DE.all.json",
+ )
+}
+
+var _wski18n_resources_en_us_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xd4\x7d\x5f\x73\x1b\x37\xb2\xef\x7b\x3e\x45\x97\x6b\xab\xe4\xdc\x22\xe5\xdd\xfb\x72\xeb\x3a\x27\xa7\x4a\x91\x98\x58\x89\x2d\xa9\x24\x39\xbb\xae\xd5\x96\x09\x72\x40\x11\xd1\x10\x98\x00\x18\xd1\xb4\x57\xdf\xfd\x14\xfe\xcc\x70\x86\xc4\xbf\x99\xa1\xec\x3d\x4f\x96\x87\xdd\xbf\x6e\x00\x0d\xa0\xd1\x68\x00\xff\xfc\x0e\xe0\xcb\x77\x00\x00\x2f\x48\xf6\xe2\x35\xbc\x38\x29\x8a\x9c\xcc\x91\x24\x8c\x02\xfe\x44\x24 [...]
+
+func wski18n_resources_en_us_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_en_us_all_json,
+ "wski18n/resources/en_US.all.json",
+ )
+}
+
+var _wski18n_resources_es_es_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
+
+func wski18n_resources_es_es_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_es_es_all_json,
+ "wski18n/resources/es_ES.all.json",
+ )
+}
+
+var _wski18n_resources_fr_fr_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8a\xe6\x52\x50\xa8\xe6\x52\x50\x50\x50\x50\xca\x4c\x51\xb2\x52\x50\x4a\xaa\x2c\x48\x2c\x2e\x56\x48\x4e\x2d\x2a\xc9\x4c\xcb\x4c\x4e\x2c\x49\x55\x48\xce\x48\x4d\xce\xce\xcc\x4b\x57\xd2\x81\x28\x2c\x29\x4a\xcc\x2b\xce\x49\x2c\xc9\xcc\xcf\x03\xe9\x08\xce\xcf\x4d\x55\x40\x12\x53\xc8\xcc\x53\x70\x2b\x4a\xcd\x4b\xce\x50\xe2\x52\x50\xa8\xe5\x8a\xe5\x02\x04\x00\x00\xff\xff\x45\xa4\xe9\x62\x65\x00\x00\x00")
+
+func wski18n_resources_fr_fr_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_fr_fr_all_json,
+ "wski18n/resources/fr_FR.all.json",
+ )
+}
+
+var _wski18n_resources_it_it_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
+
+func wski18n_resources_it_it_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_it_it_all_json,
+ "wski18n/resources/it_IT.all.json",
+ )
+}
+
+var _wski18n_resources_ja_ja_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
+
+func wski18n_resources_ja_ja_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_ja_ja_all_json,
+ "wski18n/resources/ja_JA.all.json",
+ )
+}
+
+var _wski18n_resources_ko_kr_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
+
+func wski18n_resources_ko_kr_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_ko_kr_all_json,
+ "wski18n/resources/ko_KR.all.json",
+ )
+}
+
+var _wski18n_resources_pt_br_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
+
+func wski18n_resources_pt_br_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_pt_br_all_json,
+ "wski18n/resources/pt_BR.all.json",
+ )
+}
+
+var _wski18n_resources_zh_hans_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
+
+func wski18n_resources_zh_hans_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_zh_hans_all_json,
+ "wski18n/resources/zh_Hans.all.json",
+ )
+}
+
+var _wski18n_resources_zh_hant_all_json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x01\x00\x00\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00")
+
+func wski18n_resources_zh_hant_all_json() ([]byte, error) {
+ return bindata_read(
+ _wski18n_resources_zh_hant_all_json,
+ "wski18n/resources/zh_Hant.all.json",
+ )
+}
+
+// Asset loads and returns the asset for the given name.
+// It returns an error if the asset could not be found or
+// could not be loaded.
+func Asset(name string) ([]byte, error) {
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ if f, ok := _bindata[cannonicalName]; ok {
+ return f()
+ }
+ return nil, fmt.Errorf("Asset %s not found", name)
+}
+
+// AssetNames returns the names of the assets.
+func AssetNames() []string {
+ names := make([]string, 0, len(_bindata))
+ for name := range _bindata {
+ names = append(names, name)
+ }
+ return names
+}
+
+// _bindata is a table, holding each asset generator, mapped to its name.
+var _bindata = map[string]func() ([]byte, error){
+ "wski18n/resources/de_DE.all.json": wski18n_resources_de_de_all_json,
+ "wski18n/resources/en_US.all.json": wski18n_resources_en_us_all_json,
+ "wski18n/resources/es_ES.all.json": wski18n_resources_es_es_all_json,
+ "wski18n/resources/fr_FR.all.json": wski18n_resources_fr_fr_all_json,
+ "wski18n/resources/it_IT.all.json": wski18n_resources_it_it_all_json,
+ "wski18n/resources/ja_JA.all.json": wski18n_resources_ja_ja_all_json,
+ "wski18n/resources/ko_KR.all.json": wski18n_resources_ko_kr_all_json,
+ "wski18n/resources/pt_BR.all.json": wski18n_resources_pt_br_all_json,
+ "wski18n/resources/zh_Hans.all.json": wski18n_resources_zh_hans_all_json,
+ "wski18n/resources/zh_Hant.all.json": wski18n_resources_zh_hant_all_json,
+}
+// AssetDir returns the file names below a certain
+// directory embedded in the file by go-bindata.
+// For example if you run go-bindata on data/... and data contains the
+// following hierarchy:
+// data/
+// foo.txt
+// img/
+// a.png
+// b.png
+// then AssetDir("data") would return []string{"foo.txt", "img"}
+// AssetDir("data/img") would return []string{"a.png", "b.png"}
+// AssetDir("foo.txt") and AssetDir("notexist") would return an error
+// AssetDir("") will return []string{"data"}.
+func AssetDir(name string) ([]string, error) {
+ node := _bintree
+ if len(name) != 0 {
+ cannonicalName := strings.Replace(name, "\\", "/", -1)
+ pathList := strings.Split(cannonicalName, "/")
+ for _, p := range pathList {
+ node = node.Children[p]
+ if node == nil {
+ return nil, fmt.Errorf("Asset %s not found", name)
+ }
+ }
+ }
+ if node.Func != nil {
+ return nil, fmt.Errorf("Asset %s not found", name)
+ }
+ rv := make([]string, 0, len(node.Children))
+ for name := range node.Children {
+ rv = append(rv, name)
+ }
+ return rv, nil
+}
+
+type _bintree_t struct {
+ Func func() ([]byte, error)
+ Children map[string]*_bintree_t
+}
+var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
+ "wski18n": &_bintree_t{nil, map[string]*_bintree_t{
+ "resources": &_bintree_t{nil, map[string]*_bintree_t{
+ "de_DE.all.json": &_bintree_t{wski18n_resources_de_de_all_json, map[string]*_bintree_t{
+ }},
+ "en_US.all.json": &_bintree_t{wski18n_resources_en_us_all_json, map[string]*_bintree_t{
+ }},
+ "es_ES.all.json": &_bintree_t{wski18n_resources_es_es_all_json, map[string]*_bintree_t{
+ }},
+ "fr_FR.all.json": &_bintree_t{wski18n_resources_fr_fr_all_json, map[string]*_bintree_t{
+ }},
+ "it_IT.all.json": &_bintree_t{wski18n_resources_it_it_all_json, map[string]*_bintree_t{
+ }},
+ "ja_JA.all.json": &_bintree_t{wski18n_resources_ja_ja_all_json, map[string]*_bintree_t{
+ }},
+ "ko_KR.all.json": &_bintree_t{wski18n_resources_ko_kr_all_json, map[string]*_bintree_t{
+ }},
+ "pt_BR.all.json": &_bintree_t{wski18n_resources_pt_br_all_json, map[string]*_bintree_t{
+ }},
+ "zh_Hans.all.json": &_bintree_t{wski18n_resources_zh_hans_all_json, map[string]*_bintree_t{
+ }},
+ "zh_Hant.all.json": &_bintree_t{wski18n_resources_zh_hant_all_json, map[string]*_bintree_t{
+ }},
+ }},
+ }},
+}}
(openserverless-cli) 01/02: patches for submodules
Posted by ms...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
msciabarra pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openserverless-cli.git
commit 3d727afc537ddc77cb0d5e6f6f158b967908ebc7
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Thu Jul 18 21:26:14 2024 +0200
patches for submodules
---
README.md | 11 ++++++++++-
auth/login.go | 2 +-
auth/login_test.go | 2 +-
go.mod | 1 -
main.go | 6 +++---
patches/.gitignore | 3 ++-
patches/builtin_extra.go | 47 ++++++++++++++++++++++++++-------------------
patches/gosh | Bin 3998109 -> 0 bytes
patches/patch-wsk.sh | 45 ++++++++++++++++++++++++++++---------------
patches/patch-wskdeploy.sh | 11 ++++++-----
patches/runtimes_extra.go | 2 +-
tools/sh | 2 +-
tools/wsk | 2 +-
tools/wskdeploy | 2 +-
14 files changed, 83 insertions(+), 53 deletions(-)
diff --git a/README.md b/README.md
index a513fcc..ff70bd0 100644
--- a/README.md
+++ b/README.md
@@ -69,6 +69,7 @@ The following environment variables allows to ovverride certain defaults.
- `NUV_PWD` is the folder where `nuv` is executed (the current working directory). It is used to preserve the original working directory when `nuv` is used again in tasks (e.g. nuv -realpath to retrieve the correct path). Change it only if you know what you are doing!
- `NUV_ROOT_PLUGIN` is the folder where `nuv` looks for plugins. If not defined, it defaults to the same directory where `nuv` is located.
- `NUV_OLARIS` holds the head commit hash of the used olaris repo. You can see the hash with `nuv -info`.
+
## Where `nuv` looks for binaries
- `NUV_USE_COREUTILS` enables the use of [coreutils](https://github.com/uutils/coreutils) instead of the current unix tools implementation. They will eventually replace the current tools.
@@ -82,6 +83,15 @@ Nuv is normally distributed with an installer that includes all the tools for th
**NOTE**: You can download the relevant tools when you run from source code executing `task install`. This task will download the command line tools and setup a link in `/usr/local/bin` to invoke `nuv`.
+## Internal environment variables
+
+`OPS_RUNTIMES_JSON` is used for the values of the runtimes json if the system is unable to read in other ways the current runtimes json. It is normally compiled in when you buid from the current version of the runtimes.json. It can be overriden
+
+`OPS_COREUTILS` is a string, a space separated list, which lists all the commands the coreutils binary provided. It should be kept updated with the values of the current version used. It can be overriden
+
+`OPS_TOOLS` is a string, a space separated list, which lists all the commands provided as internal tool by the ops binary. It shold be kept updated with the current list of tools provided. It can be overriden defining externally
+
+
## Where `nuv` looks for tasks
Nuv is an enhanced task runner. Tasks are described by [task](https://taskfile.dev) taskfiles.
@@ -192,4 +202,3 @@ Basic unix like tools (`nuv -<tool> -help for details`):
-
diff --git a/auth/login.go b/auth/login.go
index 0090f0b..335ac2f 100644
--- a/auth/login.go
+++ b/auth/login.go
@@ -30,7 +30,7 @@ import (
"path/filepath"
"github.com/mitchellh/go-homedir"
- "github.com/nuvolaris/nuv/config"
+ "github.com/apache/openserverless-cli/config"
"github.com/zalando/go-keyring"
)
diff --git a/auth/login_test.go b/auth/login_test.go
index f9981ee..6f69615 100644
--- a/auth/login_test.go
+++ b/auth/login_test.go
@@ -26,7 +26,7 @@ import (
"testing"
"github.com/mitchellh/go-homedir"
- "github.com/nuvolaris/nuv/config"
+ "github.com/apache/openserverless-cli/config"
"github.com/stretchr/testify/require"
"github.com/zalando/go-keyring"
)
diff --git a/go.mod b/go.mod
index d38acf1..8b11bf3 100644
--- a/go.mod
+++ b/go.mod
@@ -44,7 +44,6 @@ require (
github.com/nuvolaris/goja_nodejs v0.0.0-20231014102937-c453e3fed097 // indirect
github.com/nuvolaris/openwhisk-cli/commands v0.0.0-20240322185850-dd1d7107d5b6
github.com/nuvolaris/openwhisk-cli/wski18n v0.0.0-20240322185850-dd1d7107d5b6
- github.com/nuvolaris/openwhisk-wskdeploy v0.0.0-20230916104531-c4bc982185e9 // indirect
github.com/nuvolaris/sh/v3 v3.7.1-nuv.2309151614 // indirect
github.com/nwidger/jsoncolor v0.0.0-20170215171346-75a6de4340e5 // indirect
github.com/pkg/errors v0.9.1 // indirect
diff --git a/main.go b/main.go
index cf0a473..a69916e 100644
--- a/main.go
+++ b/main.go
@@ -28,9 +28,9 @@ import (
"time"
"github.com/mitchellh/go-homedir"
- "github.com/nuvolaris/nuv/auth"
- "github.com/nuvolaris/nuv/config"
- "github.com/nuvolaris/nuv/tools"
+ "github.com/apache/openserverless-cli/auth"
+ "github.com/apache/openserverless-cli/config"
+ "github.com/apache/openserverless-cli/tools"
_ "embed"
)
diff --git a/patches/.gitignore b/patches/.gitignore
index bfd6871..74f09bd 100644
--- a/patches/.gitignore
+++ b/patches/.gitignore
@@ -1,4 +1,5 @@
task
gosh
wsk
-wskdeploy
+openwhisk-wskdeploy
+openwhisk-cli
diff --git a/patches/builtin_extra.go b/patches/builtin_extra.go
index aefa1e2..ee10fc7 100644
--- a/patches/builtin_extra.go
+++ b/patches/builtin_extra.go
@@ -6,55 +6,62 @@ package interp
import (
"context"
"fmt"
+ "os"
+ "strings"
"github.com/sciabarracom/sh/v3/syntax"
)
func isCoreutil(name string) bool {
- switch name {
- case
- "arch", "b2sum", "b3sum", "base32", "base64", "basename", "basenc", "cat", "chgrp", "chmod", "chown", "chroot",
- "cksum", "comm", "cp", "csplit", "cut", "date", "dd", "df", "dir", "dircolors", "dirname", "du", "echo", "env", "expand",
- "expr", "factor", "false", "fmt", "fold", "groups", "hashsum", "head", "hostid", "hostname", "id", "install", "join",
- "kill", "link", "ln", "logname", "ls", "md5sum", "mkdir", "mkfifo", "mknod", "mktemp", "more", "mv", "nice", "nl",
- "nohup", "nproc", "numfmt", "od", "paste", "pathchk", "pinky", "pr", "printenv", "printf", "ptx", "pwd", "readlink",
- "realpath", "rm", "rmdir", "seq", "sha1sum", "sha224sum", "sha256sum", "sha3-224sum", "sha3-256sum", "sha3-384sum",
- "sha3-512sum", "sha384sum", "sha3sum", "sha512sum", "shake128sum", "shake256sum", "shred", "shuf", "sleep", "sort",
- "split", "stat", "stdbuf", "sum", "sync", "tac", "tail", "tee", "test", "timeout", "touch", "tr", "true", "truncate",
- "tsort", "tty", "uname", "unexpand", "uniq", "unlink", "uptime", "users", "vdir", "wc", "who", "whoami", "yes",
- "coreutils":
- return true
+ coreUtils := os.Getenv("OPS_COREUTILS")
+ if coreUtils == "" {
+ return false
}
- return false
+ coreUtils = " coreutils " + coreUtils + " "
+ return strings.Contains(coreUtils, " "+name+" ")
+}
+func isTools(name string) bool {
+ tools := os.Getenv("OPS_TOOLS")
+ if tools == "" {
+ return false
+ }
+ tools = " " + tools + " "
+ return strings.Contains(tools, " "+name+" ")
}
func isBuiltin(name string) bool {
-
if isCoreutil(name) {
return true
}
+ if isTools(name) {
+ return true
+ }
return _isBuiltin(name)
}
func (r *Runner) builtinCode(ctx context.Context, pos syntax.Pos, name string, args []string) int {
if isCoreutil(name) {
-
cmd := []string{"coreutils"}
if name != "coreutils" {
cmd = append(cmd, name)
}
args = append(cmd, args...)
fmt.Printf("%v\n", args)
- // TODO: Consider unix.Exec, i.e. actually replacing
- // the process. It's in theory what a shell should do,
- // but in practice it would kill the entire Go process
- // and it's not available on Windows.
r.exitShell(ctx, 1)
r.exec(ctx, args)
return r.exit
}
+ if isTools(name) {
+ args = append([]string{"ops", "-" + name}, args...)
+ fmt.Printf("%v\n", args)
+ r.exitShell(ctx, 1)
+ r.exec(ctx, args)
+ return r.exit
+
+ }
+
return _builtinCode(ctx, pos, name, args)
}
diff --git a/patches/gosh b/patches/gosh
deleted file mode 100755
index feea20d..0000000
Binary files a/patches/gosh and /dev/null differ
diff --git a/patches/patch-wsk.sh b/patches/patch-wsk.sh
index efee39a..d71215a 100644
--- a/patches/patch-wsk.sh
+++ b/patches/patch-wsk.sh
@@ -2,31 +2,44 @@
cd "$(dirname $0)"
# any suggestion how to avoid this rename and use just replaces in go.mod is welcome
HERE=$PWD
-STAG="v3.38.0"
-DTAG="$STAG-openserverless"
-cd ../tools/task
-git checkout "$TAG" -B openserverless
-mkdir -p cmd/taskmain
-cat cmd/task/task.go \
-| sed -e 's/package main/package taskmain/' \
-| sed -e 's/func main() {/func Task(_args []string) { os.Args = _args/' \
-| tee cmd/taskmain/task.go
-cp $HERE/task.go cmd/taskmain/task.go
-git add cmd/taskmain/task.go
+STAG="1.2.0"
+DTAG="v$STAG-openserverless"
+cd ../tools/wsk
+git reset --hard
+git checkout "$STAG" -B openserverless
+cp $HERE/i18n_resources.go wski18n/i18n_resources.go
+sed -i '/wski18n\/i18n_resources.go/d' .gitignore
+git add wski18n/i18n_resources.go
find . \( -name \*.go -o -name go.mod \) | while read file
do echo $file
- sed -i "s!go-task/task!sciabarracom/task!" $file
- sed -i 's!mvdan.sh/cc!sciabarracom/sh!' $file
- sed -i 's!"Taskfile.!"opsfile.!' $file
- sed -i 's!task: !ops: !' $file
+ sed -i 's!apache/openwhisk-cli/!sciabarracom/openwhisk-cli/!' $file
+ sed -i 's!apache/openwhisk-cli"!sciabarracom/openwhisk-cli"!' $file
+ sed -i 's!apache/openwhisk-cli !sciabarracom/openwhisk-cli !' $file
+ sed -i 's!apache/openwhisk-cli$!sciabarracom/openwhisk-cli!' $file
+ sed -i 's!apache/openwhisk-wskdeploy!sciabarracom/openwhisk-wskdeploy!' $file
done
go clean -modcache -cache -testcache -fuzzcache
+
+sed -i '/openwhisk-wskdeploy/d' go.mod
+sed -i '/openwhisk-client-go/d' go.mod
+
+go get github.com/sciabarracom/openwhisk-wskdeploy@$DTAG
+go get github.com/apache/openwhisk-client-go@$STAG
+
go mod tidy
git commit -m "patching sh for ops" -a
git push origin-auth openserverless -f
+
git tag -d $DTAG
git tag $DTAG
git push origin-auth --delete $DTAG
git push origin-auth $DTAG
-GOBIN=$HERE go install github.com/sciabarracom/task/v3/cmd/task@$DTAG
+git push origin-auth openserverless
+
+
+# misterious bug here - it is building apache/openwhisk-cli instead
+#echo $CUR
+#go clean -modcache -cache -testcache -fuzzcache
+#CUR=$(git rev-parse $DTAG)
+#GOBIN=$HERE go install github.com/sciabarracom/openwhisk-cli@$DTAG
diff --git a/patches/patch-wskdeploy.sh b/patches/patch-wskdeploy.sh
index 92f313f..66bceba 100644
--- a/patches/patch-wskdeploy.sh
+++ b/patches/patch-wskdeploy.sh
@@ -3,15 +3,16 @@ cd "$(dirname $0)"
# any suggestion how to avoid this rename and use just replaces in go.mod is welcome
HERE=$PWD
STAG="1.2.0"
-DTAG="$STAG-openserverless"
+DTAG="v$STAG-openserverless"
cd ../tools/wskdeploy
git checkout "$STAG" -B openserverless
-
+cp $HERE/runtimes_extra.go runtimes/runtimes_extra.go
+git add runtimes/runtimes_extra.go
+sed -i -e 's/func ParseOpenWhisk/func _ParseOpenWhisk/' runtimes/runtimes.go
find . \( -name \*.go -o -name go.mod \) | while read file
do echo $file
- sed -i "s!apache/openwhisk-wskdeploy!sciabarracom/openwhisk-wskdeploy!" $file
+ sed -i 's!apache/openwhisk-wskdeploy!sciabarracom/openwhisk-wskdeploy!' $file
done
-
go clean -modcache -cache -testcache -fuzzcache
go mod tidy
git commit -m "patching sh for ops" -a
@@ -20,5 +21,5 @@ git tag -d $DTAG
git tag $DTAG
git push origin-auth --delete $DTAG
git push origin-auth $DTAG
-GOBIN=$HERE go install github.com/sciabarracom/task/v3/cmd/task@$DTAG
+GOBIN=$HERE go install github.com/sciabarracom/openwhisk-wskdeploy@$DTAG
diff --git a/patches/runtimes_extra.go b/patches/runtimes_extra.go
index 55e6d9b..3f376fe 100644
--- a/patches/runtimes_extra.go
+++ b/patches/runtimes_extra.go
@@ -97,7 +97,7 @@ func ParseOpenWhisk(apiHost string) (op OpenWhiskInfo, err error) {
if err != nil {
stdout := wski18n.T(wski18n.ID_MSG_UNMARSHAL_LOCAL)
wskprint.PrintOpenWhiskVerbose(utils.Flags.Verbose, stdout)
- runtimes := []byte(os.Getenv("WSK_RUNTIMES_JSON"))
+ runtimes := []byte(os.Getenv("OPS_RUNTIMES_JSON"))
err = json.Unmarshal(runtimes, &op)
if err != nil {
fmt.Printf("cannot parse this json: ===\n%s\n===\n", runtimes)
diff --git a/tools/sh b/tools/sh
index cff5f78..a15cbff 160000
--- a/tools/sh
+++ b/tools/sh
@@ -1 +1 @@
-Subproject commit cff5f78351fc572179e787b98a733aad73453f8d
+Subproject commit a15cbff318785adeb90f0d45c1a2fd4b565acdbf
diff --git a/tools/wsk b/tools/wsk
index b1ca4bc..a732332 160000
--- a/tools/wsk
+++ b/tools/wsk
@@ -1 +1 @@
-Subproject commit b1ca4bccc2c256a073ffc114913c43d78f412830
+Subproject commit a732332d04d3cb75e8749042d4a753c4ceef90a4
diff --git a/tools/wskdeploy b/tools/wskdeploy
index 03df112..41b6c36 160000
--- a/tools/wskdeploy
+++ b/tools/wskdeploy
@@ -1 +1 @@
-Subproject commit 03df1126c3b5205d642738479a08bb7cd66a03b3
+Subproject commit 41b6c36418c2fbb2127371b27a6abbb9ba730ebe