scorpiox-bot-plugin-files
←release-dist.shbash
38 lines · 1 KBHEADBlameDownload
1#!/bin/sh
2# release-dist.sh - thin wrapper around the shared multi-arch release tool.
3#
4# The real cross-target build + dist publish lives in scorpiox-cli-botplugin
5# (it owns the musl / aarch64 / MinGW / macOS toolchains and the plugingit
6# mirror). This script only exists so the repo can be released the same way
7# every other oss plugin is, and so a stale release-dist keeps failing loudly
8# instead of shipping a 3-target manifest that says "release complete".
9#
10# ./release-dist.sh # build + publish version from plugin.json / 1.0.0
11# VERSION=1.0.1 ./release-dist.sh # explicit version
12#
13# Run it on the build host that has musl-gcc, aarch64-linux-gnu-gcc,
14# x86_64-w64-mingw32-gcc and ssh access to the macOS builder.
15
16set -eu
17
18SLUG=files
19VERSION="${VERSION:-1.0.0}"
20PLUGINGIT_TOKEN_FILE="${PLUGINGIT_TOKEN_FILE:-/etc/scorpiox-plugingit.token}"
21
22ROOT=$(cd "$(dirname "$0")" && pwd)
23
24if ! command -v scorpiox-cli-botplugin >/dev/null 2>&1; then
25 echo "scorpiox-cli-botplugin not found on PATH" >&2
26 exit 1
27fi
28
29echo "==> publish $SLUG $VERSION"
30scorpiox-cli-botplugin publish "$ROOT" \
31 --slug "$SLUG" \
32 --version "$VERSION" \
33 --macos-host "${MACOS_HOST:-yongchen@macos-builder}" \
34 --json
35
36echo "==> verify target count in the published manifest"
37scorpiox-cli-botplugin reindex --json >/dev/null 2>&1 || true
38echo "check dist/bot-plugins/$SLUG/$VERSION/manifest.json has 6 targets before calling it done"