Merge pull request #41 from akhilesharora/fix/deploy-mktemp-template

Fix mktemp template so deploy-managed-agent.sh runs on Linux
This commit is contained in:
Tobin South 2026-05-28 17:48:17 -07:00 committed by GitHub
commit efc8d4edf9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,7 +70,7 @@ json.dump(yaml.safe_load(t), sys.stdout)
' "$1" ' "$1"
} }
SKILL_CACHE_FILE="$(mktemp -t skillcache)" SKILL_CACHE_FILE="$(mktemp -t skillcache.XXXXXX)"
trap 'rm -f "$SKILL_CACHE_FILE"' EXIT trap 'rm -f "$SKILL_CACHE_FILE"' EXIT
upload_skill() { upload_skill() {
local path="$1" key cached local path="$1" key cached
@ -83,7 +83,7 @@ upload_skill() {
printf '%s' "$cached"; return printf '%s' "$cached"; return
fi fi
local resp id zip local resp id zip
zip="$(mktemp -t skill).zip" zip="$(mktemp -t skill.XXXXXX).zip"
(cd "$(dirname "$path")" && zip -qr "$zip" "$(basename "$path")") (cd "$(dirname "$path")" && zip -qr "$zip" "$(basename "$path")")
# /v1/skills uses its own beta header and multipart, not the managed-agents JSON path # /v1/skills uses its own beta header and multipart, not the managed-agents JSON path
resp=$(curl -sS "$API/v1/skills" \ resp=$(curl -sS "$API/v1/skills" \