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