fix(release): allow --standalone so the Windows leg can link -liphlpapi -lws2_32
scorpiox-cli-botplugin build has a fixed link line (`-static` only) and cannot express extra Windows libraries, so its MinGW leg fails with undefined __imp_socket/__imp_connect for any plugin that opens a socket. This script can.
AuthorPico <picobot@scorpioplayer.com>
Date2026-11-11 05:50:14
Commit4ef7e6b5
Parents68b668e8
Changed files
release-dist.sh+7−2■■■■■
1 file+7−2
Diff
release-dist.sh+7−2■■■■■
index 8a91ea2..31ead27 100755
--- a/release-dist.sh
+++ b/release-dist.sh
@@ -23,6 +23,9 @@
2323 # ./release-dist.sh --dry-run # build + stage in /tmp, no upload
2424 # ./release-dist.sh --no-macos # skip the macOS legs
2525 # ./release-dist.sh --no-mirror # skip the plugingit mirror
26+# ./release-dist.sh --standalone # use this script even if the CLI is installed
27+# # (needed for plugins that link extra Win32 libs,
28+# # which the CLI's fixed link line cannot express)
2629
2730 set -euo pipefail
2831
@@ -37,8 +40,10 @@ cd "$ROOT"
3740 DRY_RUN=0
3841 DO_MACOS=1
3942 DO_MIRROR=1
43+STANDALONE=0
4044 for arg in "$@"; do
4145 case "$arg" in
46+ --standalone) STANDALONE=1 ;;
4247 --dry-run) DRY_RUN=1 ;;
4348 --no-macos) DO_MACOS=0 ;;
4449 --no-mirror) DO_MIRROR=0 ;;
@@ -63,11 +68,11 @@ die() { printf '\033[31mERROR:\033[0m %s\n' "$1" >&2; exit 1; }
6368 # ---------------------------------------------------------------- 0. preflight
6469 say "0/7 preflight"
6570
66-if command -v scorpiox-cli-botplugin >/dev/null 2>&1; then
71+if [ "$STANDALONE" -eq 0 ] && command -v scorpiox-cli-botplugin >/dev/null 2>&1; then
6772 say "using scorpiox-cli-botplugin publish"
6873 exec scorpiox-cli-botplugin publish "$ROOT"
6974 fi
70-echo " scorpiox-cli-botplugin not installed - running standalone pipeline"
75+echo " running the standalone pipeline"
7176
7277 [ -n "$(git status --porcelain 2>/dev/null)" ] && \
7378 echo " note: working tree is dirty; source.tar.gz comes from the last commit"
7479
release-dist.sh+7−2■■■■■
index 8a91ea2..31ead27 100755index 8a91ea2..31ead27 100755
--- a/release-dist.sh--- a/release-dist.sh
+++ b/release-dist.sh+++ b/release-dist.sh
@@ -23,6 +23,9 @@@@ -23,6 +23,9 @@
23 # ./release-dist.sh --dry-run # build + stage in /tmp, no upload23 # ./release-dist.sh --dry-run # build + stage in /tmp, no upload
24 # ./release-dist.sh --no-macos # skip the macOS legs24 # ./release-dist.sh --no-macos # skip the macOS legs
25 # ./release-dist.sh --no-mirror # skip the plugingit mirror25 # ./release-dist.sh --no-mirror # skip the plugingit mirror
26+# ./release-dist.sh --standalone # use this script even if the CLI is installed
27+# # (needed for plugins that link extra Win32 libs,
28+# # which the CLI's fixed link line cannot express)
26 29
27 set -euo pipefail30 set -euo pipefail
28 31
@@ -37,8 +40,10 @@ cd "$ROOT"@@ -37,8 +40,10 @@ cd "$ROOT"
37 DRY_RUN=040 DRY_RUN=0
38 DO_MACOS=141 DO_MACOS=1
39 DO_MIRROR=142 DO_MIRROR=1
43+STANDALONE=0
40 for arg in "$@"; do44 for arg in "$@"; do
41 case "$arg" in45 case "$arg" in
46+ --standalone) STANDALONE=1 ;;
42 --dry-run) DRY_RUN=1 ;;47 --dry-run) DRY_RUN=1 ;;
43 --no-macos) DO_MACOS=0 ;;48 --no-macos) DO_MACOS=0 ;;
44 --no-mirror) DO_MIRROR=0 ;;49 --no-mirror) DO_MIRROR=0 ;;
@@ -63,11 +68,11 @@ die() { printf '\033[31mERROR:\033[0m %s\n' "$1" >&2; exit 1; }@@ -63,11 +68,11 @@ die() { printf '\033[31mERROR:\033[0m %s\n' "$1" >&2; exit 1; }
63 # ---------------------------------------------------------------- 0. preflight68 # ---------------------------------------------------------------- 0. preflight
64 say "0/7 preflight"69 say "0/7 preflight"
65 70
66-if command -v scorpiox-cli-botplugin >/dev/null 2>&1; then71+if [ "$STANDALONE" -eq 0 ] && command -v scorpiox-cli-botplugin >/dev/null 2>&1; then
67 say "using scorpiox-cli-botplugin publish"72 say "using scorpiox-cli-botplugin publish"
68 exec scorpiox-cli-botplugin publish "$ROOT"73 exec scorpiox-cli-botplugin publish "$ROOT"
69 fi74 fi
70-echo " scorpiox-cli-botplugin not installed - running standalone pipeline"75+echo " running the standalone pipeline"
71 76
72 [ -n "$(git status --porcelain 2>/dev/null)" ] && \77 [ -n "$(git status --porcelain 2>/dev/null)" ] && \
73 echo " note: working tree is dirty; source.tar.gz comes from the last commit"78 echo " note: working tree is dirty; source.tar.gz comes from the last commit"
7479