Menu
Public repository / 8d41f1e10aceed387d425b43038f2070e399a349
AkurAI-Build / scripts/test-service-deploy.sh
Latest change a0c9d4ff8c1ee8397ccd5287465783b1f0f23d04 - deploy: path-activated root forge swap; CI job stages binary without sudo (OLI-279) by Ólafur Búi Ólafsson
#!/bin/sh # --scheduled must stage the binary and request without sudo. set -eu root="$(cd "$(dirname "$0")/.." && pwd)" tmp="$(mktemp -d)"; trap 'rm -rf "$tmp"' EXIT mkdir -p "$tmp/work/target/release" "$tmp/lib" "$tmp/bin" printf '#!/bin/sh\n' > "$tmp/work/target/release/akurai"; chmod +x "$tmp/work/target/release/akurai" printf '#!/bin/sh\necho sudo called >&2; exit 99\n' > "$tmp/bin/sudo"; chmod +x "$tmp/bin/sudo" cd "$tmp/work" PATH="$tmp/bin:$PATH" AKURAI_DEPLOY_STAGING="$tmp/stage" AKURAI_BUILD_LIB="$tmp/lib" \ sh "$root/deploy/service-deploy.sh" --scheduled test -x "$tmp/stage/akurai" && test -f "$tmp/stage/request" echo "ok"