This is an automated email from the ASF dual-hosted git repository.
csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git
The following commit(s) were added to refs/heads/master by this push:
new ba806e1 Recognize balx files as binary. (#401)
ba806e1 is described below
commit ba806e15b99de9f0595198a61d631952dc579174
Author: rodric rabbah <[email protected]>
AuthorDate: Sat Jan 26 10:14:37 2019 -0500
Recognize balx files as binary. (#401)
---
commands/action.go | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/commands/action.go b/commands/action.go
index d8dad83..93da0a0 100644
--- a/commands/action.go
+++ b/commands/action.go
@@ -54,6 +54,7 @@ const (
SWIFT_EXT = ".swift"
ZIP_EXT = ".zip"
PHP_EXT = ".php"
+ BAL_BIN_EXT = ".balx"
RUBY_EXT = ".rb"
GO_EXT = ".go"
NODE_JS = "nodejs"
@@ -63,6 +64,7 @@ const (
PHP = "php"
RUBY = "ruby"
GO = "go"
+ BAL = "ballerina"
DEFAULT = "default"
BLACKBOX = "blackbox"
SEQUENCE = "sequence"
@@ -600,7 +602,7 @@ func getExec(args []string, params ActionFlags)
(*whisk.Exec, error) {
return nil, err
}
- if ext == ZIP_EXT || ext == JAVA_EXT {
+ if ext == ZIP_EXT || ext == JAVA_EXT || ext == BAL_BIN_EXT {
code = base64.StdEncoding.EncodeToString([]byte(code))
}
@@ -634,6 +636,8 @@ func getExec(args []string, params ActionFlags)
(*whisk.Exec, error) {
exec.Kind = fmt.Sprintf("%s:%s", RUBY, DEFAULT)
} else if ext == GO_EXT {
exec.Kind = fmt.Sprintf("%s:%s", GO, DEFAULT)
+ } else if ext == BAL_BIN_EXT {
+ exec.Kind = fmt.Sprintf("%s:%s", BAL, DEFAULT)
} else {
if ext == ZIP_EXT {
return nil, zipKindError()