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 <[email protected]> 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
