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
The following commit(s) were added to refs/heads/main by this push:
new 373a439 compiling ops
373a439 is described below
commit 373a439113e40ea06b055df529f45eb45f7ab6ef
Author: Michele Sciabarra <[email protected]>
AuthorDate: Tue Jul 23 14:34:50 2024 +0200
compiling ops
---
.gitignore | 1 +
Taskfile.yml | 13 +--
cmd/ops/ops.go | 7 ++
common.go | 2 +-
main.go | 6 +-
main_test.go | 2 +-
nuv.go | 2 +-
nuv_test.go | 2 +-
plugin.go | 2 +-
plugin_test.go | 2 +-
preflight.go | 2 +-
preflight_test.go | 2 +-
prepare.go | 2 +-
prepare_test.go | 2 +-
runtimes.json | 279 ++------------------------------------------------
serve.go | 2 +-
serve_test.go | 2 +-
task.go | 2 +-
updates_check.go | 2 +-
updates_check_test.go | 2 +-
20 files changed, 37 insertions(+), 299 deletions(-)
diff --git a/.gitignore b/.gitignore
index a3f47cc..20ccc83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,3 +41,4 @@ actions.zip
nuv.spec
nix/result
.direnv/
+ops
diff --git a/Taskfile.yml b/Taskfile.yml
index ee9e17a..463d4a6 100644
--- a/Taskfile.yml
+++ b/Taskfile.yml
@@ -31,10 +31,7 @@ tasks:
cli-tag:
desc: tag the cli to generate the build
- - >
- curl -sL
https://raw.githubusercontent.com/apache/openserverless-task/{{.BRANCH}}/runtimes.json
- | jq '{"runtimes": .runtimes}' >runtimes.json
- - git add runtimes.json
+ cmds:
- git tag -d $(git tag)
- git tag -f {{.BASEVER}}.$(date +%y%m%d%H%M){{.S}}
- git tag
@@ -86,12 +83,8 @@ tasks:
- bats/bin/bats .
clean:
- - rm -f bin/nuv runtimes.json
- - go clean -cache -modcache
+ - go clean -cache -modcache -testcache -fuzzcache
- rebuild:
- - rm -f bin/nuv
- - task: build
utestdiff:
cmds:
@@ -100,5 +93,5 @@ tasks:
then go test -v | tee _difftest
python3 difftest.py
else python3 difftest.py {{.N}}
-x fi
+ fi
diff --git a/cmd/ops/ops.go b/cmd/ops/ops.go
new file mode 100644
index 0000000..1edab03
--- /dev/null
+++ b/cmd/ops/ops.go
@@ -0,0 +1,7 @@
+package main
+
+import ops "github.com/apache/openserverless-cli"
+
+func main() {
+ ops.Main()
+}
diff --git a/common.go b/common.go
index 4d61dbe..645d381 100644
--- a/common.go
+++ b/common.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"encoding/json"
diff --git a/main.go b/main.go
index 426f9d6..b26aa14 100644
--- a/main.go
+++ b/main.go
@@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"errors"
@@ -27,9 +27,9 @@ import (
"strings"
"time"
- "github.com/apache/openserverless-cli/tools"
"github.com/apache/openserverless-cli/auth"
"github.com/apache/openserverless-cli/config"
+ "github.com/apache/openserverless-cli/tools"
"github.com/mitchellh/go-homedir"
@@ -100,7 +100,7 @@ func info() {
//go:embed runtimes.json
var WSK_RUNTIMES_JSON string
-func main() {
+func Main() {
// set runtime version as environment variable
if os.Getenv("WSK_RUNTIMES_JSON") == "" {
os.Setenv("WSK_RUNTIMES_JSON", WSK_RUNTIMES_JSON)
diff --git a/main_test.go b/main_test.go
index 519dc3e..aa1f0c2 100644
--- a/main_test.go
+++ b/main_test.go
@@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"fmt"
diff --git a/nuv.go b/nuv.go
index 4c90831..43d7486 100644
--- a/nuv.go
+++ b/nuv.go
@@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"bufio"
diff --git a/nuv_test.go b/nuv_test.go
index a477579..24262e4 100644
--- a/nuv_test.go
+++ b/nuv_test.go
@@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"fmt"
diff --git a/plugin.go b/plugin.go
index db28e07..353266e 100644
--- a/plugin.go
+++ b/plugin.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"errors"
diff --git a/plugin_test.go b/plugin_test.go
index 1643d5c..ff983aa 100644
--- a/plugin_test.go
+++ b/plugin_test.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"io"
diff --git a/preflight.go b/preflight.go
index de6b9a9..e82daf7 100644
--- a/preflight.go
+++ b/preflight.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"fmt"
diff --git a/preflight_test.go b/preflight_test.go
index cc26520..257645c 100644
--- a/preflight_test.go
+++ b/preflight_test.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"errors"
diff --git a/prepare.go b/prepare.go
index 85efead..21e7424 100644
--- a/prepare.go
+++ b/prepare.go
@@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"fmt"
diff --git a/prepare_test.go b/prepare_test.go
index 6c41e7f..d178ed9 100644
--- a/prepare_test.go
+++ b/prepare_test.go
@@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"os"
diff --git a/runtimes.json b/runtimes.json
index a7edb74..5c5d594 100644
--- a/runtimes.json
+++ b/runtimes.json
@@ -1,27 +1,13 @@
{
"runtimes": {
"nodejs": [
- {
- "kind": "nodejs:21",
- "default": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-nodejs-v21",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- },
{
"kind": "nodejs:20",
"default": true,
"image": {
- "prefix": "ghcr.io/nuvolaris",
+ "prefix": "apacheopenserverless",
"name": "runtime-nodejs-v20",
- "tag": "3.1.0-mastrogpt.2405160951"
+ "tag": "latest"
},
"deprecated": false,
"attached": {
@@ -41,34 +27,6 @@
}
}
]
- },
- {
- "kind": "nodejs:18",
- "default": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-nodejs-v18",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- },
- {
- "kind": "nodejs:16",
- "default": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "action-nodejs-v16",
- "tag": "3.0.0-beta.2309081459"
- },
- "deprecated": true,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
}
],
"python": [
@@ -76,9 +34,9 @@
"kind": "python:3",
"default": true,
"image": {
- "prefix": "ghcr.io/nuvolaris",
+ "prefix": "apacheopenserverless",
"name": "runtime-python-v3.11",
- "tag": "3.1.0-mastrogpt.2405160951"
+ "tag": "latest"
},
"deprecated": false,
"attached": {
@@ -98,79 +56,6 @@
}
}
]
- },
- {
- "kind": "python:3.11",
- "default": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-python-v3.11",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- },
- {
- "kind": "python:3.12",
- "default": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-python-v3.12",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- },
- {
- "kind": "python:310",
- "default": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-python-v3.10",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- },
- {
- "kind": "python:310kube",
- "default": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "action-python-v310-kube",
- "tag": "2310270000"
- },
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- }
- ],
- "java": [
- {
- "kind": "java:8",
- "default": true,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "action-java-v8",
- "tag": "0.3.0-morpheus.22110809"
- },
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- },
- "requireMain": true
}
],
"go": [
@@ -183,51 +68,9 @@
"attachmentType": "text/plain"
},
"image": {
- "prefix": "ghcr.io/nuvolaris",
+ "prefix": "apacheopenserverless",
"name": "runtime-golang-v1.22",
- "tag": "3.1.0-mastrogpt.2405160951"
- }
- },
- {
- "kind": "go:1.21",
- "default": false,
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- },
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-golang-v1.21",
- "tag": "3.1.0-mastrogpt.2405160951"
- }
- },
- {
- "kind": "go:1.20",
- "default": false,
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- },
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-golang-v1.20",
- "tag": "3.1.0-mastrogpt.2405160951"
- }
- },
- {
- "kind": "go:1.20mf",
- "default": false,
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- },
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "go-nuvolaris-metaflow",
- "tag": "bc86ab6"
+ "tag": "latest"
}
}
],
@@ -237,120 +80,14 @@
"default": true,
"deprecated": false,
"image": {
- "prefix": "ghcr.io/nuvolaris",
+ "prefix": "apacheopenserverless",
"name": "runtime-php-v8.3",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- },
- {
- "kind": "php:8.2",
- "default": false,
- "deprecated": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-php-v8.2",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- },
- {
- "kind": "php:8.1",
- "default": false,
- "deprecated": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-php-v8.1",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- },
- {
- "kind": "php:8.0",
- "default": false,
- "deprecated": false,
- "image": {
- "prefix": "ghcr.io/nuvolaris",
- "name": "runtime-php-v8.0",
- "tag": "3.1.0-mastrogpt.2405160951"
- },
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- }
- ],
- "ruby": [
- {
- "kind": "ruby:2.5",
- "default": true,
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- },
- "image": {
- "prefix": "openwhisk",
- "name": "action-ruby-v2.5",
- "tag": "nightly"
- }
- }
- ],
- "dotnet": [
- {
- "kind": "dotnet:2.2",
- "default": true,
- "deprecated": false,
- "requireMain": true,
- "image": {
- "prefix": "openwhisk",
- "name": "action-dotnet-v2.2",
- "tag": "nightly"
+ "tag": "latest"
},
"attached": {
"attachmentName": "codefile",
"attachmentType": "text/plain"
}
- },
- {
- "kind": "dotnet:3.1",
- "default": false,
- "deprecated": false,
- "requireMain": true,
- "image": {
- "prefix": "openwhisk",
- "name": "action-dotnet-v3.1",
- "tag": "nightly"
- },
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
- }
- ],
- "rust": [
- {
- "kind": "rust:1.34",
- "default": true,
- "image": {
- "prefix": "openwhisk",
- "name": "action-rust-v1.34",
- "tag": "nightly"
- },
- "deprecated": false,
- "attached": {
- "attachmentName": "codefile",
- "attachmentType": "text/plain"
- }
}
]
}
diff --git a/serve.go b/serve.go
index f4832f5..6476ece 100644
--- a/serve.go
+++ b/serve.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"flag"
diff --git a/serve_test.go b/serve_test.go
index 32439bb..ed035db 100644
--- a/serve_test.go
+++ b/serve_test.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"io"
diff --git a/task.go b/task.go
index 58dd17f..062c540 100644
--- a/task.go
+++ b/task.go
@@ -14,7 +14,7 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"fmt"
diff --git a/updates_check.go b/updates_check.go
index 116d112..58e6a58 100644
--- a/updates_check.go
+++ b/updates_check.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"errors"
diff --git a/updates_check_test.go b/updates_check_test.go
index ef37ce9..3a04e2a 100644
--- a/updates_check_test.go
+++ b/updates_check_test.go
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-package main
+package openserverless
import (
"os"