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/31 17:17:43 UTC
(openserverless-cli) branch main updated (edbbf40 -> 32175b0)
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 edbbf40 correct workflows name
add a2bc57e 0.1.0-testing.2407310826
add e60c6c7 0.1.0-testing.2407310830
add a7cda04 0.1.0-testing.2407310833
add 0a2a523 0.1.0-testing.2407310833
new c7f3922 0.1.0-testing.2407310845
new 8f1c3cb versioning
new 32175b0 update tools and various fixes
The 3 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:
.github/workflows/release.yml | 11 ++++----
.gitignore | 13 ---------
Taskfile.yml | 21 ++++++++++-----
_patches/README.md | 8 +++---
_patches/builtin_extra.go | 2 +-
_patches/patch-sh.sh | 2 +-
_patches/patch-task.sh | 2 +-
_patches/sh | 2 +-
_patches/task | Bin 17159510 -> 0 bytes
branch.txt | 2 +-
common.go | 2 +-
go.mod | 6 ++---
go.sum | 12 +++------
main.go | 44 +++++++++++-------------------
preflight.go | 7 +++--
prepare.go | 18 ++++++++-----
prereq.go | 2 +-
tests/{retry.bats => mvrm.bats} | 46 +++++++++++++++-----------------
tests/testdata/olaris-other/nuvfile.yml | 2 +-
tools/remove.go | 24 +++++++++++++++++
tools/rename.go | 24 +++++++++++++++++
tools/tools.go | 46 +++++++++++++-------------------
version.txt | 2 +-
23 files changed, 159 insertions(+), 139 deletions(-)
delete mode 100755 _patches/task
copy tests/{retry.bats => mvrm.bats} (56%)
create mode 100644 tools/remove.go
create mode 100644 tools/rename.go
(openserverless-cli) 02/03: versioning
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 8f1c3cbf8a1e8416f377db052f8620765f02bf59
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Wed Jul 31 15:02:28 2024 +0200
versioning
---
.github/workflows/release.yml | 2 ++
Taskfile.yml | 10 +++---
branch.txt | 2 +-
common.go | 2 +-
main.go | 42 +++++++++----------------
prepare.go | 18 +++++++----
tests/mvrm.bats | 55 +++++++++++++++++++++++++++++++++
tests/testdata/olaris-other/nuvfile.yml | 2 +-
tools/remove.go | 24 ++++++++++++++
tools/rename.go | 24 ++++++++++++++
tools/tools.go | 46 +++++++++++----------------
version.txt | 2 +-
12 files changed, 158 insertions(+), 71 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index c3d50a0..56549c7 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -20,6 +20,8 @@ jobs:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
+ with:
+ go-version: '>=1.22.5'
- name: Run Tests
run: |
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d
diff --git a/Taskfile.yml b/Taskfile.yml
index eb49f88..f27d1a8 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -18,8 +18,8 @@
version: "3"
vars:
- BRANCH: "0.1.0-testing"
- BASEVER: "0.1.0-testing"
+ BASEVER: "0.1.0"
+ VARIANT: "dev"
VERSION:
sh: git describe --tags --abbrev=0 2>/dev/null || git rev-parse --short HEAD
DEBUG: ""
@@ -29,13 +29,13 @@ tasks:
default: task -l
setup: { silent:true }
- cli-tag:
+ tag:
desc: tag the cli to generate the build
cmds:
- git tag -d $(git tag)
- - echo "{{.BASEVER}}.$(date +%y%m%d%H%M)" >version.txt
+ - echo "{{.BASEVER}}-$(date +%y%m%d%H%M).{{.VARIANT}}" >version.txt
- git tag -f "v$(cat version.txt)"
- - echo "{{.BRANCH}}" >branch.txt
+ - echo "{{.BASEVER}}" >branch.txt
- git add version.txt branch.txt
- git tag
diff --git a/branch.txt b/branch.txt
index 19f64bc..6e8bf73 100644
--- a/branch.txt
+++ b/branch.txt
@@ -1 +1 @@
-0.1.0-testing
+0.1.0
diff --git a/common.go b/common.go
index 62852f2..0012ff5 100644
--- a/common.go
+++ b/common.go
@@ -172,7 +172,7 @@ func trace(args ...any) {
}
}
-var debugging = os.Getenv("DEBUG") != ""
+var debugging = os.Getenv("DEBUG") != "" || os.Getenv("TRACE") != ""
func debug(args ...any) {
if debugging {
diff --git a/main.go b/main.go
index 08621d3..3c892da 100644
--- a/main.go
+++ b/main.go
@@ -104,17 +104,12 @@ func info() {
fmt.Println("NUV_ROOT_PLUGIN:", os.Getenv("NUV_ROOT_PLUGIN"))
}
-// execute the embedded tools
-// version
-// info
-// help
-// serve
-// update
-// retry
-// login
-// config
-// plugin
-func executeEmbeddedToolsAndExit(cmd string, args []string, nuvHome string) int {
+// not available in taskfiles
+var mainTools = []string{
+ "task", "version", "info", "help", "serve", "update", "retry", "login", "config", "plugin",
+}
+
+func executeMainToolsAndExit(cmd string, args []string, nuvHome string) int {
if cmd == "" || cmd == "-" || cmd == "task" {
exitCode, err := Task(args[2:]...)
if err != nil {
@@ -133,7 +128,7 @@ func executeEmbeddedToolsAndExit(cmd string, args []string, nuvHome string) int
info()
case "help":
- tools.Help()
+ tools.Help(mainTools)
case "serve":
nuvRootDir := getRootDirOrExit()
@@ -150,10 +145,6 @@ func executeEmbeddedToolsAndExit(cmd string, args []string, nuvHome string) int
if err := setNuvOlarisHash(dir); err != nil {
log.Fatal("unable to set NUV_OLARIS...", err.Error())
}
- err = ensurePrereq(dir)
- if err != nil {
- log.Fatalf("cannot download prerequisites: %v", err)
- }
case "retry":
if err := tools.ExpBackoffRetry(args[1:]); err != nil {
@@ -175,7 +166,7 @@ func executeEmbeddedToolsAndExit(cmd string, args []string, nuvHome string) int
if err := wskPropertySet(loginResult.ApiHost, loginResult.Auth); err != nil {
log.Fatalf("error: %s", err.Error())
}
- fmt.Println("Nuvolaris host and auth set successfully. You are now ready to use nuv -wsk!")
+ fmt.Println("OpenServerless host and auth set successfully. You are now ready to use ops!")
case "config":
os.Args = args[1:]
@@ -235,7 +226,7 @@ func Main() {
// setup OPS_CMD
me := args[0]
if strings.Contains("ops ops.exe nuv nuv.exe", filepath.Base(me)) {
- tools.NuvCmd, err = setupCmd(me)
+ _, err = setupCmd(me)
if err != nil {
log.Fatalf("cannot setup cmd: %s", err.Error())
}
@@ -269,6 +260,9 @@ func Main() {
log.Fatalf("cannot setup NUV_PWD: %s", err.Error())
}
+ // setup the envvar for the embedded tools
+ os.Setenv("OPS_TOOLS", strings.Join(append(mainTools, tools.ToolList...), " "))
+
// NUV_REPO && NUV_ROOT_PLUGIN
getNuvRepo()
setNuvRootPluginEnv()
@@ -278,7 +272,7 @@ func Main() {
if err != nil {
olarisDir := joinpath(joinpath(nuvHome, getNuvBranch()), "olaris")
if !isDir(olarisDir) {
- log.Println("Welcome to nuv! Setting up...")
+ log.Println("Welcome to ops! Setting up...")
olarisDir, err = pullTasks(true, true)
if err != nil {
log.Fatalf("cannot locate or download NUV_ROOT: %s", err.Error())
@@ -335,18 +329,10 @@ func Main() {
cmd := args[1][1:]
trace("executing embedded tool", cmd, args)
// execute the embeded tool and exit
- exitCode := executeEmbeddedToolsAndExit(cmd, args, nuvHome)
+ exitCode := executeMainToolsAndExit(cmd, args, nuvHome)
os.Exit(exitCode)
}
- // *************** executing tasks
-
- // ensure prerequisites
- err = ensurePrereq(nuvRootDir)
- if err != nil {
- log.Fatalf("cannot ensure prerequisites: %s", err.Error())
- }
-
if err := runNuv(nuvRootDir, args); err != nil {
log.Fatalf("task execution error: %s", err.Error())
}
diff --git a/prepare.go b/prepare.go
index 7c7413d..38ed336 100644
--- a/prepare.go
+++ b/prepare.go
@@ -18,6 +18,7 @@ package openserverless
import (
"fmt"
+ "log"
"os"
"os/exec"
"path/filepath"
@@ -99,7 +100,7 @@ func downloadTasksFromGitHub(force bool, silent bool) (string, error) {
return "", err
}
- fmt.Println("Nuvfiles downloaded successfully")
+ fmt.Println("Tasks downloaded successfully")
createLatestCheckFile(nuvBranchDir)
@@ -115,6 +116,11 @@ func pullTasks(force, silent bool) (string, error) {
return "", err
}
+ err = ensurePrereq(localDir)
+ if err != nil {
+ log.Fatalf("cannot download prerequisites: %v", err)
+ }
+
// validate NuvVersion semver against nuvroot.json
nuvRoot, err := readNuvRootFile(localDir)
if err != nil {
@@ -138,8 +144,7 @@ func pullTasks(force, silent bool) (string, error) {
// check if the version is up to date, if not warn the user
if nuvVersion.LessThan(nuvRootVersion) {
fmt.Println()
- fmt.Printf("Your nuv version (%v) is older than the required version in nuvroot.json (%v).\n", nuvVersion, nuvRootVersion)
- fmt.Println("Attempting to update nuv...")
+ fmt.Printf("Your ops version (%v) is older than the required version (%v).\n", nuvVersion, nuvRootVersion)
if err := autoCLIUpdate(); err != nil {
return "", err
}
@@ -208,8 +213,9 @@ func locateNuvRootSearch(cur string) string {
}
func autoCLIUpdate() error {
- trace("autoCLIUpdate")
- cmd := exec.Command("nuv", "update", "cli")
+ cli := os.Getenv("OPS_CMD")
+ trace("autoCLIUpdate", cli)
+ cmd := exec.Command(cli, "util", "update-cli")
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
return cmd.Run()
@@ -221,7 +227,7 @@ func checkOperatorVersion(nuvRootConfig map[string]interface{}) error {
operator := images["operator"].(string)
opVer := strings.Split(operator, ":")[1]
- cmd := exec.Command("nuv", "util", "check-operator-version", opVer)
+ cmd := exec.Command(os.Getenv("OPS_CMD"), "util", "check-operator-version", opVer)
return cmd.Run()
}
diff --git a/tests/mvrm.bats b/tests/mvrm.bats
new file mode 100644
index 0000000..76947b8
--- /dev/null
+++ b/tests/mvrm.bats
@@ -0,0 +1,55 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+setup() {
+ load 'test_helper/bats-support/load'
+ load 'test_helper/bats-assert/load'
+ export NO_COLOR=1
+}
+
+@test "-rename -remove" {
+ run nuv -rename
+ assert_line "Usage: rename <source> <destination>"
+
+ run nuv -rename missing
+ assert_line "Usage: rename <source> <destination>"
+
+ run nuv -rename missing something
+ assert_failure
+ assert_line "rename missing something: no such file or directory"
+
+ touch something
+ run nuv -rename something somethingelse
+ assert_success
+ assert_line "renamed something -> somethingelse"
+
+ run nuv -rename somethingelse /dev/null
+ assert_failure
+ assert_line "rename somethingelse /dev/null: invalid cross-device link"
+
+ run nuv -remove
+ assert_line "Usage: remove <filename>"
+
+ run nuv -remove missing
+ assert_failure
+ assert_line "remove missing: no such file or directory"
+
+ run nuv -remove somethingelse
+ assert_success
+ assert_line "removed somethingelse"
+}
+
diff --git a/tests/testdata/olaris-other/nuvfile.yml b/tests/testdata/olaris-other/nuvfile.yml
index b811f80..1de705d 100644
--- a/tests/testdata/olaris-other/nuvfile.yml
+++ b/tests/testdata/olaris-other/nuvfile.yml
@@ -29,4 +29,4 @@ tasks:
command:
desc: run nuv setup status
cmds:
- - nuv setup status
+ - nuv version
diff --git a/tools/remove.go b/tools/remove.go
new file mode 100644
index 0000000..1b669f0
--- /dev/null
+++ b/tools/remove.go
@@ -0,0 +1,24 @@
+package tools
+
+import (
+ "fmt"
+ "os"
+)
+
+func Remove() (int, error) {
+ if len(os.Args) != 2 {
+ fmt.Println("Usage: remove <filename>")
+ return 0, nil
+ }
+
+ filename := os.Args[1]
+
+ err := os.Remove(filename)
+ if err != nil {
+ return 1, err
+ }
+
+ fmt.Printf("removed %s\n", filename)
+
+ return 0, nil
+}
diff --git a/tools/rename.go b/tools/rename.go
new file mode 100644
index 0000000..b59dd08
--- /dev/null
+++ b/tools/rename.go
@@ -0,0 +1,24 @@
+package tools
+
+import (
+ "fmt"
+ "os"
+)
+
+func Rename() (int, error) {
+ if len(os.Args) != 3 {
+ fmt.Println("Usage: rename <source> <destination>")
+ return 0, nil
+ }
+
+ source := os.Args[1]
+ destination := os.Args[2]
+
+ err := os.Rename(source, destination)
+ if err != nil {
+ return 1, err
+ }
+
+ fmt.Printf("renamed %s -> %s\n", source, destination)
+ return 0, nil
+}
diff --git a/tools/tools.go b/tools/tools.go
index 946e128..df41f00 100644
--- a/tools/tools.go
+++ b/tools/tools.go
@@ -32,23 +32,16 @@ import (
// available in taskfiles
// note some of them are implemented in main.go (config, retry)
-var tools = []string{
- "awk", "die", "jq",
- "envsubst", "wsk",
- "filetype", "random", "datefmt",
- "config", "retry", "urlenc",
- "replace", "base64", "validate",
+var ToolList = []string{
+ "wsk", "awk", "jq",
+ "envsubst", "filetype", "random", "datefmt",
+ "die", "urlenc", "replace", "base64", "validate",
"echoif", "echoifempty", "echoifexists",
- "needupdate", "gron", "jj", "deploy",
-}
-
-// not available in taskfiles
-var extraTools = []string{
- "update", "login", "help", "info", "version", "task", "plugin", "serve",
+ "needupdate", "gron", "jj", "rename", "remove",
}
func IsTool(name string) bool {
- for _, s := range tools {
+ for _, s := range ToolList {
if s == name {
return true
}
@@ -56,19 +49,6 @@ func IsTool(name string) bool {
return false
}
-var NuvCmd = ""
-
-func GetNuvCmd() string {
- if NuvCmd != "" {
- return NuvCmd
- }
- nuv := os.Getenv("NUV_CMD")
- if nuv != "" {
- return nuv
- }
- return ""
-}
-
func RunTool(name string, args []string) (int, error) {
switch name {
case "wsk":
@@ -156,14 +136,24 @@ func RunTool(name string, args []string) (int, error) {
case "jj":
os.Args = append([]string{"jj"}, args...)
return jj.JJMain()
+
+ case "rename":
+ os.Args = append([]string{"rename"}, args...)
+ return Rename()
+
+ case "remove":
+ os.Args = append([]string{"rename"}, args...)
+ return Remove()
+
default:
+ return 1, fmt.Errorf("unknown tool")
}
return 0, nil
}
-func Help() {
+func Help(mainTools []string) {
fmt.Println("Available tools:")
- availableTools := append(tools, extraTools...)
+ availableTools := append(mainTools, ToolList...)
slices.Sort(availableTools)
for _, x := range availableTools {
fmt.Printf("-%s\n", x)
diff --git a/version.txt b/version.txt
index ba5ea1c..8d7a4ad 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-0.1.0-testing.2407310845
+0.1.0-2407311501.dev
(openserverless-cli) 03/03: update tools and various fixes
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 32175b07b7bbbfbe16b933a224f3b623f285daa5
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Wed Jul 31 19:17:26 2024 +0200
update tools and various fixes
---
.gitignore | 13 -------------
_patches/README.md | 8 ++++----
_patches/builtin_extra.go | 2 +-
_patches/patch-sh.sh | 2 +-
_patches/patch-task.sh | 2 +-
_patches/sh | 2 +-
_patches/task | Bin 17159510 -> 0 bytes
go.mod | 6 ++----
go.sum | 12 ++++--------
main.go | 2 ++
preflight.go | 7 +++++--
prereq.go | 2 +-
12 files changed, 22 insertions(+), 36 deletions(-)
diff --git a/.gitignore b/.gitignore
index 1289731..922493a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,19 +21,7 @@
.task/
attic/
_*
-bin/nuv
-bin/nuv.exe
-bin/windows/wix
-bin/*/amd64/*
-bin/*/arm64/*
-*-build-*
-*.deb
-*.rpm
-*.msi
-*.pkg
.latestcheck
-bin/unzip.exe
-bin/*/LICENSE
.test_fail_then_succeed
cookie.txt
actions.zip
@@ -50,5 +38,4 @@ _patch/wsk
_patch/openwhisk-wskdeploy
_patch/openwhisk-cli
tests/prereq/olaris/bin
-
dist/
diff --git a/_patches/README.md b/_patches/README.md
index 300f656..f02d061 100644
--- a/_patches/README.md
+++ b/_patches/README.md
@@ -31,19 +31,19 @@ This is the procedure we followed to build the patched versions of:
then add remote upstream to the original repos to fetch tags
then git fetch --all
-3. execute the patch scripts in order
+3. execute the patch scripts in order (if you change them remember to increase version numbers)
bash patch-sh.sh
bash patch-task.sh
bash patch-wskdeploy.sh
bash patch-wsk.sh
-4. regenerate the go.mod/go.sum in top level
+4. regenerate the go.mod/go.sum in top level (using the latest versions if you changed them!)
cd ..
rm go.mod go.sum
go mod init github.com/apache/openserverless-cli
go get github.com/sciabarracom/openwhisk-cli@v1.2.1
-go get github.com/sciabarracom/task/v3/cmd/taskmain@v3.38.4
+go get github.com/sciabarracom/task/v3/cmd/taskmain@v3.38.9
go mod tidy
-bo build
+go build
diff --git a/_patches/builtin_extra.go b/_patches/builtin_extra.go
index e68e48e..b871539 100644
--- a/_patches/builtin_extra.go
+++ b/_patches/builtin_extra.go
@@ -55,7 +55,7 @@ func (r *Runner) builtinCode(ctx context.Context, pos syntax.Pos, name string, a
}
if isTools(name) {
- args = append([]string{"ops", "-" + name}, args...)
+ args = append([]string{os.Getenv("OPS_CMD"), "-" + name}, args...)
fmt.Printf("%v\n", args)
r.exitShell(ctx, 1)
r.exec(ctx, args)
diff --git a/_patches/patch-sh.sh b/_patches/patch-sh.sh
index 26aa544..e5e8f52 100644
--- a/_patches/patch-sh.sh
+++ b/_patches/patch-sh.sh
@@ -4,7 +4,7 @@ cd "$(dirname $0)"
go clean -cache -modcache -testcache
HERE=$PWD
STAG="v3.8.0"
-DTAG="v3.8.1"
+DTAG="v3.8.2"
cd sh
git checkout "$STAG" -B openserverless
cp $HERE/builtin_extra.go interp/builtin_extra.go
diff --git a/_patches/patch-task.sh b/_patches/patch-task.sh
index 66718f2..8d5c790 100644
--- a/_patches/patch-task.sh
+++ b/_patches/patch-task.sh
@@ -4,7 +4,7 @@ cd "$(dirname $0)"
HERE=$PWD
SHVER=$(git ls-remote https://github.com/sciabarracom/sh | awk '/refs\/heads\/openserverless/{print $1}')
STAG="v3.38.0"
-DTAG="v3.38.7"
+DTAG="v3.38.9"
cd taskfile
go clean -cache -modcache
git checkout "$STAG" -B openserverless
diff --git a/_patches/sh b/_patches/sh
index da753fd..3af9e5f 160000
--- a/_patches/sh
+++ b/_patches/sh
@@ -1 +1 @@
-Subproject commit da753fd27b1ff147f5c8f1dae46676ad5a062ee2
+Subproject commit 3af9e5f9bb79a26fe345550d714a4d6c6f63c0e7
diff --git a/_patches/task b/_patches/task
deleted file mode 100755
index c5c1815..0000000
Binary files a/_patches/task and /dev/null differ
diff --git a/go.mod b/go.mod
index f670934..7f9448a 100644
--- a/go.mod
+++ b/go.mod
@@ -2,8 +2,6 @@ module github.com/apache/openserverless-cli
go 1.22.5
-retract v1.2.0-openserverless
-
require (
github.com/Masterminds/semver v1.5.0
github.com/apache/openwhisk-client-go v0.0.0-20210311185314-87edc2364717
@@ -22,7 +20,7 @@ require (
github.com/nuvolaris/jj v0.0.0-20231020143327-10b90948a5d2
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
github.com/sciabarracom/openwhisk-cli v1.2.1
- github.com/sciabarracom/task/v3 v3.38.7
+ github.com/sciabarracom/task/v3 v3.38.9
github.com/stretchr/testify v1.9.0
github.com/zalando/go-keyring v0.2.5
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
@@ -85,7 +83,7 @@ require (
github.com/rivo/uniseg v0.4.7 // indirect
github.com/sajari/fuzzy v1.0.0 // indirect
github.com/sciabarracom/openwhisk-wskdeploy v1.2.1 // indirect
- github.com/sciabarracom/sh/v3 v3.8.1 // indirect
+ github.com/sciabarracom/sh/v3 v3.8.2 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/spf13/cobra v1.1.3 // indirect
diff --git a/go.sum b/go.sum
index 2eb29ca..a0fddf2 100644
--- a/go.sum
+++ b/go.sum
@@ -343,14 +343,10 @@ github.com/sciabarracom/openwhisk-cli v1.2.1 h1:XVEAidwhmoOpvjKkqcIfGzLQwe850K5E
github.com/sciabarracom/openwhisk-cli v1.2.1/go.mod h1:KIF6FPfQ6d2mNSEFP7oiz49iHxjDCeFTnCS7XwHAlUI=
github.com/sciabarracom/openwhisk-wskdeploy v1.2.1 h1:t5hgca9OFEO39t4OqIxcWybYRjyBW7jDhg54eLar29U=
github.com/sciabarracom/openwhisk-wskdeploy v1.2.1/go.mod h1:bWjrIOIAzt8AcPqiJ0mWEecUxXbT4bY4ysMlJO6/q78=
-github.com/sciabarracom/sh/v3 v3.8.1 h1:DQXhDNnbcGbeMtaTFbGa8OlmZZxxfBcwI8u8oS2gSyg=
-github.com/sciabarracom/sh/v3 v3.8.1/go.mod h1:CeMVr3PRLhlUrS+VPLTp8dS5/6xNzmmX0h/WVHRR6DA=
-github.com/sciabarracom/task/v3 v3.38.5 h1:n3MoGltcwTtuG3R4tlPX9V0DmFYa55ESDItNiJIpiYk=
-github.com/sciabarracom/task/v3 v3.38.5/go.mod h1:KOSMNSJm4CBpVzAXUlkgEPgbDp9kQoL9nNm/B6DvcW0=
-github.com/sciabarracom/task/v3 v3.38.6 h1:vNVqq/EUDkCbt4TUvk4LWtpD4wE0G4mveWMBb8QUieU=
-github.com/sciabarracom/task/v3 v3.38.6/go.mod h1:KOSMNSJm4CBpVzAXUlkgEPgbDp9kQoL9nNm/B6DvcW0=
-github.com/sciabarracom/task/v3 v3.38.7 h1:cWN+wE5zDW/U5VLoj/D9PFNHqgGodM+5XtY8av5hZso=
-github.com/sciabarracom/task/v3 v3.38.7/go.mod h1:KOSMNSJm4CBpVzAXUlkgEPgbDp9kQoL9nNm/B6DvcW0=
+github.com/sciabarracom/sh/v3 v3.8.2 h1:ZAdlsq2d1UnvdbnOgENhZ/bTqKdwEM89ftX7kokVFnI=
+github.com/sciabarracom/sh/v3 v3.8.2/go.mod h1:CeMVr3PRLhlUrS+VPLTp8dS5/6xNzmmX0h/WVHRR6DA=
+github.com/sciabarracom/task/v3 v3.38.9 h1:LozhBEsGQGYKJCAhOE+0s22IF92DATMNDU/RMzpbSCw=
+github.com/sciabarracom/task/v3 v3.38.9/go.mod h1:V88FdSzukQ90H9nzqexBsmBRXpoEpJGsVPMoOnkAsWc=
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8=
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4=
diff --git a/main.go b/main.go
index 3c892da..d9a7ba2 100644
--- a/main.go
+++ b/main.go
@@ -102,6 +102,8 @@ func info() {
fmt.Println("NUV_PWD:", os.Getenv("NUV_PWD"))
fmt.Println("NUV_OLARIS:", os.Getenv("NUV_OLARIS"))
fmt.Println("NUV_ROOT_PLUGIN:", os.Getenv("NUV_ROOT_PLUGIN"))
+ //fmt.Println("OPS_TOOLS:", os.Getenv("OPS_TOOLS"))
+ //fmt.Println("OPS_COREUTILS:", os.Getenv("OPS_COREUTILS"))
}
// not available in taskfiles
diff --git a/preflight.go b/preflight.go
index e82daf7..522e757 100644
--- a/preflight.go
+++ b/preflight.go
@@ -45,8 +45,11 @@ func preflightChecks() error {
preflight.check(checkInstalled("curl"))
preflight.check(checkInstalled("ssh"))
- // preflight.check(checkInstalled("grep"))
-
+ if getOS() != "windows" {
+ preflight.check(checkInstalled("grep"))
+ preflight.check(checkInstalled("xz"))
+ preflight.check(checkInstalled("gunzip"))
+ }
return preflight.err
}
diff --git a/prereq.go b/prereq.go
index 2918090..6d13c3b 100644
--- a/prereq.go
+++ b/prereq.go
@@ -199,7 +199,7 @@ func downloadPrereq(name string, task PrereqTask) error {
// fixing the name for windows adding .exe
name = addExeExt(name)
if !exists(bindir, name) {
- return fmt.Errorf("failed to download %s %s", name, version)
+ return fmt.Errorf("failed to download %s version %s", name, version)
}
}
(openserverless-cli) 01/03: 0.1.0-testing.2407310845
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 c7f39229e76d141f10e283a694476431ded0dd85
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Wed Jul 31 08:45:34 2024 +0200
0.1.0-testing.2407310845
---
.github/workflows/release.yml | 2 +-
Taskfile.yml | 4 ++--
version.txt | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index fcd7445..c3d50a0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -1,4 +1,4 @@
-name: goreleaser
+name: release
on:
push:
diff --git a/Taskfile.yml b/Taskfile.yml
index 6ab9add..eb49f88 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -79,8 +79,8 @@ tasks:
- sudo cp ops /usr/local/bin
- sudo ln -sf /usr/local/bin/ops /usr/local/bin/nuv
- test:
- desc: tests all
+ tests:
+ desc: all tests
cmds:
- task: install
- task: utest
diff --git a/version.txt b/version.txt
index bf39c56..ba5ea1c 100644
--- a/version.txt
+++ b/version.txt
@@ -1 +1 @@
-0.1.0-testing.2407310833
+0.1.0-testing.2407310845