select insin CLI by host arch, drop qemu note, bump version to 1.0.15

This commit is contained in:
EugeneTes
2026-07-23 08:44:17 +00:00
parent 7105659ab0
commit 421f3085f0
3 changed files with 11 additions and 5 deletions

View File

@@ -317,9 +317,9 @@ Insin uses a flat global package namespace with the `AdminToken` auth header (NO
set -euo pipefail
: "${INSIN_URL:?}" "${INSIN_TOKEN:?}"
# 1. Fetch latest CLI (linux-arm64 shown; use win-x64 on Windows CI).
# 1. Fetch latest CLI (pick RID matching host — linux-x64 shown).
LATEST=$(curl -fsSL "$INSIN_URL/api/v1/downloads/cli" \
| python3 -c 'import json,sys; m=json.load(sys.stdin)[0]; a=next(x for x in m["artifacts"] if x["rid"]=="linux-arm64"); print(m["version"], a["filename"])')
| python3 -c 'import json,sys; m=json.load(sys.stdin)[0]; a=next(x for x in m["artifacts"] if x["rid"]=="linux-x64"); print(m["version"], a["filename"])')
VERSION=${LATEST% *}; FILENAME=${LATEST#* }
curl -fsSL "$INSIN_URL/api/v1/downloads/cli/$VERSION/$FILENAME" -o /tmp/insin.tar.gz
mkdir -p /tmp/insin && tar -xzf /tmp/insin.tar.gz -C /tmp/insin
@@ -345,7 +345,7 @@ Under the hood `publish` = `POST $INSIN_URL/api/v1/admin/packages` (multipart fo
- **First publish auto-creates** the package name. No separate registration.
- **Versions are immutable.** Re-publishing the same `(name, version)` returns **409 Conflict**. Bump the version.
- **Flat global namespace** — no scopes. Pick a distinctive name (we use `epson-print-service`).
- **CLI artifacts:** only `linux-arm64` and `win-x64` today. On `linux-x64` CI, run under qemu (`--platform linux/arm64`) — the CLI is just packer + uploader so emulation is fine.
- **CLI artifacts** ship for `linux-x64`, `linux-arm64`, `linux-arm`, and `win-x64` (as of CLI 1.3.1). Pick the RID that matches the host; no qemu required.
- **`insin pack` output is one dir UP** (`../packages/`), not `./`. Look there if the `.pkg` seems missing.
- If both `INSIN_ADMIN_TOKEN` and `INSIN_TOKEN` are set, `publish` reads `INSIN_TOKEN` first (service token wins).
- **List packages:** `curl -H "Authorization: AdminToken $INSIN_TOKEN" $INSIN_URL/api/v1/admin/packages`.