build: release-dist.sh wrapper (audit -> publish -> reindex)
AuthorPico <picobot@scorpioplayer.com>
Date2026-11-16 11:36:50
Commit37983df4
Parents32ebee74
Changed files
release-dist.sh+41−0■■■■■
1 file+41−0
Diff
release-dist.sh+41−0■■■■■
11new file mode 100755
index 0000000..fb2cbbe
--- /dev/null
+++ b/release-dist.sh
@@ -0,0 +1,41 @@
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, the dist upload and
6+# the plugingit mirror). This script exists so the repo releases the same way
7+# every other oss plugin does, and so a stale release fails loudly instead of
8+# shipping a 5-target manifest that still says "release complete".
9+#
10+# ./release-dist.sh # build + publish the version in plugin.json
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. Nothing here
15+# contains a host address or a credential.
16+
17+set -eu
18+
19+SLUG=github
20+VERSION="${VERSION:-1.0.0}"
21+PLUGINGIT_TOKEN_FILE="${PLUGINGIT_TOKEN_FILE:-/etc/scorpiox-plugingit.token}"
22+
23+ROOT=$(cd "$(dirname "$0")" && pwd)
24+
25+if ! command -v scorpiox-cli-botplugin >/dev/null 2>&1; then
26+ echo "scorpiox-cli-botplugin not found on PATH" >&2
27+ exit 1
28+fi
29+
30+echo "==> audit $SLUG"
31+scorpiox-cli-botplugin audit "$ROOT" --json || { echo "audit blocked the release" >&2; exit 4; }
32+
33+echo "==> publish $SLUG $VERSION"
34+scorpiox-cli-botplugin publish "$ROOT" \
35+ --slug "$SLUG" \
36+ --version "$VERSION" \
37+ --json
38+
39+echo "==> reindex"
40+scorpiox-cli-botplugin reindex --json >/dev/null 2>&1 || true
41+echo "check dist/bot-plugins/$SLUG/$VERSION/manifest.json has 6 targets before calling it done"
042
release-dist.sh+41−0■■■■■
1new file mode 1007551new file mode 100755
index 0000000..fb2cbbeindex 0000000..fb2cbbe
--- /dev/null--- /dev/null
+++ b/release-dist.sh+++ b/release-dist.sh
@@ -0,0 +1,41 @@@@ -0,0 +1,41 @@
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, the dist upload and
6+# the plugingit mirror). This script exists so the repo releases the same way
7+# every other oss plugin does, and so a stale release fails loudly instead of
8+# shipping a 5-target manifest that still says "release complete".
9+#
10+# ./release-dist.sh # build + publish the version in plugin.json
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. Nothing here
15+# contains a host address or a credential.
16+
17+set -eu
18+
19+SLUG=github
20+VERSION="${VERSION:-1.0.0}"
21+PLUGINGIT_TOKEN_FILE="${PLUGINGIT_TOKEN_FILE:-/etc/scorpiox-plugingit.token}"
22+
23+ROOT=$(cd "$(dirname "$0")" && pwd)
24+
25+if ! command -v scorpiox-cli-botplugin >/dev/null 2>&1; then
26+ echo "scorpiox-cli-botplugin not found on PATH" >&2
27+ exit 1
28+fi
29+
30+echo "==> audit $SLUG"
31+scorpiox-cli-botplugin audit "$ROOT" --json || { echo "audit blocked the release" >&2; exit 4; }
32+
33+echo "==> publish $SLUG $VERSION"
34+scorpiox-cli-botplugin publish "$ROOT" \
35+ --slug "$SLUG" \
36+ --version "$VERSION" \
37+ --json
38+
39+echo "==> reindex"
40+scorpiox-cli-botplugin reindex --json >/dev/null 2>&1 || true
41+echo "check dist/bot-plugins/$SLUG/$VERSION/manifest.json has 6 targets before calling it done"
042