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/19 13:32:42 UTC
(openserverless-cli) branch main updated (6a2a303 -> d12377d)
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 6a2a303 resources
new f0be45a fix sh
new d12377d fix task and sh
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:
patches/builtin_extra.go | 5 ++---
patches/opsfile.yml | 5 +++++
patches/patch-sh.sh | 14 ++++----------
patches/patch-task.sh | 19 +++++++++----------
tools/sh | 2 +-
tools/task | 2 +-
6 files changed, 22 insertions(+), 25 deletions(-)
(openserverless-cli) 01/02: fix sh
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 f0be45aa0db508ea00f91252464bc2afb6b75164
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Fri Jul 19 15:28:13 2024 +0200
fix sh
---
patches/builtin_extra.go | 5 ++---
patches/patch-sh.sh | 13 +++++--------
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/patches/builtin_extra.go b/patches/builtin_extra.go
index ee10fc7..e68e48e 100644
--- a/patches/builtin_extra.go
+++ b/patches/builtin_extra.go
@@ -37,7 +37,7 @@ func isBuiltin(name string) bool {
if isTools(name) {
return true
}
- return _isBuiltin(name)
+ return IsBuiltin1(name)
}
func (r *Runner) builtinCode(ctx context.Context, pos syntax.Pos, name string, args []string) int {
@@ -62,6 +62,5 @@ func (r *Runner) builtinCode(ctx context.Context, pos syntax.Pos, name string, a
return r.exit
}
-
- return _builtinCode(ctx, pos, name, args)
+ return r.BuiltinCode1(ctx, pos, name, args)
}
diff --git a/patches/patch-sh.sh b/patches/patch-sh.sh
index ea1b1b6..b6d9ff2 100644
--- a/patches/patch-sh.sh
+++ b/patches/patch-sh.sh
@@ -4,12 +4,11 @@ cd "$(dirname $0)"
go clean -cache -modcache -testcache
HERE=$PWD
STAG="v3.8.0"
-DTAG="$STAG-openserverless"
cd ../tools/sh
git checkout "$STAG" -B openserverless
cp $HERE/builtin_extra.go interp/builtin_extra.go
git add interp/builtin_extra.go
-sed -i -e 's!) builtinCode(!) _builtinCode(!' -e 's!func isBuiltin!func _isBuiltin!' interp/builtin.go
+sed -i -e 's!) builtinCode(!) BuiltinCode1(!' -e 's!func isBuiltin!func IsBuiltin1!' interp/builtin.go
find . \( -name \*.go -o -name go.mod \) | while read file
do echo $file
sed -i 's!mvdan.cc/sh!github.com/sciabarracom/sh!' $file
@@ -17,12 +16,10 @@ done
go clean -modcache -cache -testcache -fuzzcache
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/sh/v3/cmd/gosh@$DTAG
+git push -f origin-auth openserverless
+git rev-parse --short HEAD >sh.version
+VER=$(cat sh.version)
+GOBIN=$HERE go install github.com/sciabarracom/sh/v3/cmd/gosh@$VER
#echo now push it git push origin-auth openserverless
(openserverless-cli) 02/02: fix task and sh
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 d12377dfb0ce7429e468932b40787c6f6173b78e
Author: Michele Sciabarra <mi...@sciabarra.com>
AuthorDate: Fri Jul 19 15:32:31 2024 +0200
fix task and sh
---
patches/opsfile.yml | 5 +++++
patches/patch-sh.sh | 5 +----
patches/patch-task.sh | 19 +++++++++----------
tools/sh | 2 +-
tools/task | 2 +-
5 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/patches/opsfile.yml b/patches/opsfile.yml
index e69de29..ab5f20f 100644
--- a/patches/opsfile.yml
+++ b/patches/opsfile.yml
@@ -0,0 +1,5 @@
+version: 3
+
+tasks:
+
+ default: arch
diff --git a/patches/patch-sh.sh b/patches/patch-sh.sh
index b6d9ff2..7684079 100644
--- a/patches/patch-sh.sh
+++ b/patches/patch-sh.sh
@@ -17,9 +17,6 @@ go clean -modcache -cache -testcache -fuzzcache
go mod tidy
git commit -m "patching sh for ops" -a
git push -f origin-auth openserverless
-git rev-parse --short HEAD >sh.version
-VER=$(cat sh.version)
+VER=$(git rev-parse --short HEAD)
GOBIN=$HERE go install github.com/sciabarracom/sh/v3/cmd/gosh@$VER
-#echo now push it git push origin-auth openserverless
-
diff --git a/patches/patch-task.sh b/patches/patch-task.sh
index de597da..6a1c1f5 100644
--- a/patches/patch-task.sh
+++ b/patches/patch-task.sh
@@ -2,8 +2,8 @@
cd "$(dirname $0)"
# any suggestion how to avoid this rename and use just replaces in go.mod is welcome
HERE=$PWD
+SHVER=$(git ls-remote https://github.com/sciabarracom/sh | awk '/refs\/heads\/openserverless/{print $1}')
STAG="v3.38.0"
-DTAG="$STAG-openserverless"
cd ../tools/task
git checkout "$STAG" -B openserverless
mkdir -p cmd/taskmain
@@ -11,22 +11,21 @@ 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
+#cp $HERE/task.go cmd/taskmain/task.go
git add cmd/taskmain/task.go
-find . \( -name \*.go -o -name go.mod \) | while read file
+find . -name \*.go | 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!mvdan.cc/sh!github.com/sciabarracom/sh!' $file
sed -i 's!"Taskfile.!"opsfile.!' $file
sed -i 's!task: !ops: !' $file
done
-go clean -modcache -cache -testcache -fuzzcache
+sed -i -e 's/go-task\/task/sciabarracom\/task/' go.mod
+sed -i -e '/mvdan.cc/g' go.mod
+go get github.com/sciabarracom/sh/v3@$SHVER
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
+VER=$(git rev-parse HEAD)
+GOBIN=$HERE go install github.com/sciabarracom/task/v3/cmd/task@$VER
diff --git a/tools/sh b/tools/sh
index a15cbff..8b997d4 160000
--- a/tools/sh
+++ b/tools/sh
@@ -1 +1 @@
-Subproject commit a15cbff318785adeb90f0d45c1a2fd4b565acdbf
+Subproject commit 8b997d445efad982d2b023d3d62d891ef80ba1d5
diff --git a/tools/task b/tools/task
index d6277bd..9f75ee2 160000
--- a/tools/task
+++ b/tools/task
@@ -1 +1 @@
-Subproject commit d6277bd28a5fdebf407623e182b6156b21261253
+Subproject commit 9f75ee2eb9d96798ff6fdc05535400343cdabb31