scorpiox-bot-plugin-nvtop
←release-dist.shbash
388 lines · 17 KBHEADBlameDownload
1#!/usr/bin/env bash
2# release-dist.sh — build, scan and publish plugin_nvtop to the plugin registry.
3#
4# Two paths:
5# A. Preferred: if `scorpiox-cli-botplugin` is installed, hand the whole job to it
6# (`scorpiox-cli-botplugin publish .`), which does the same work with a richer CLI.
7# B. Standalone (this script): secret scan -> multi-target build -> source.tar.gz ->
8# manifest.json + SHA256SUMS -> upload -> latest.json / index.json -> plugingit mirror.
9#
10# Nothing here contains a host address or a credential. Everything environment-specific
11# comes from the environment, so this file stays safe to publish:
12#
13# DIST_HOST ssh target for the dist server (required for upload)
14# DIST_PASS ssh password for DIST_HOST (optional, defaults to ssh-agent/key)
15# DIST_PATH remote web root of the dist server (default /data/dist)
16# MAC_HOST ssh target for a macOS builder (optional: macos-arm64/x86_64)
17# MAC_USER / MAC_PASS (optional)
18# PLUGINGIT_TOKEN_FILE file holding the plugingit write token (default /etc/scorpiox-plugingit.token)
19# PLUGINGIT_REMOTE public mirror URL to push into
20#
21# Usage:
22# ./release-dist.sh # full release
23# ./release-dist.sh --dry-run # build + stage in /tmp, no upload
24# ./release-dist.sh --no-macos # skip the macOS legs
25# ./release-dist.sh --no-mirror # skip the plugingit mirror
26
27set -euo pipefail
28
29SLUG="nvtop"
30ID="plugin_nvtop"
31VERSION="1.0.3"
32DIST_BASE_URL="https://dist.scorpiox.net/bot-plugins"
33
34ROOT="$(cd "$(dirname "$0")" && pwd)"
35cd "$ROOT"
36
37DRY_RUN=0
38DO_MACOS=1
39DO_MIRROR=1
40STANDALONE=0
41for arg in "$@"; do
42 case "$arg" in
43 --dry-run) DRY_RUN=1 ;;
44 --no-macos) DO_MACOS=0 ;;
45 --no-mirror) DO_MIRROR=0 ;;
46 --standalone) STANDALONE=1 ;;
47 -h|--help) sed -n '2,30p' "$0"; exit 0 ;;
48 *) echo "unknown argument: $arg" >&2; exit 2 ;;
49 esac
50done
51
52DIST_HOST="${DIST_HOST:-}"
53DIST_PASS="${DIST_PASS:-}"
54DIST_PATH="${DIST_PATH:-/data/dist}"
55PLUGINGIT_TOKEN_FILE="${PLUGINGIT_TOKEN_FILE:-/etc/scorpiox-plugingit.token}"
56PLUGINGIT_REMOTE="${PLUGINGIT_REMOTE:-https://plugingit.scorpiox.net/scorpiox-bot-plugin-${SLUG}.git}"
57
58STAGE="/tmp/${SLUG}-dist-${VERSION}-$$"
59mkdir -p "$STAGE"
60trap 'rm -rf "$STAGE"' EXIT
61
62say() { printf '\n\033[1m== %s ==\033[0m\n' "$1"; }
63die() { printf '\033[31mERROR:\033[0m %s\n' "$1" >&2; exit 1; }
64
65# ---------------------------------------------------------------- 0. preflight
66say "0/7 preflight"
67
68if [ "$STANDALONE" -eq 0 ] && command -v scorpiox-cli-botplugin >/dev/null 2>&1; then
69 say "using scorpiox-cli-botplugin publish"
70 exec scorpiox-cli-botplugin publish "$ROOT"
71fi
72echo " running the standalone pipeline (dist + plugingit mirror)"
73
74[ -n "$(git status --porcelain 2>/dev/null)" ] && \
75 echo " note: working tree is dirty; source.tar.gz comes from the last commit"
76COMMIT=$(git rev-parse HEAD 2>/dev/null || echo "unknown")
77echo " version $VERSION"
78echo " commit $COMMIT"
79
80# ---------------------------------------------------------------- 1. secret scan
81say "1/7 secret & LAN scan (full history)"
82
83SCAN_TMP="$STAGE/history.txt"
84# Scan every added/removed line of every commit. Two exclusions, both about the
85# audit rather than the code: the committer identity line, and any line that is
86# itself a scan definition — otherwise this file's own detector patterns read as
87# findings in every historical revision of it.
88git log -p --all 2>/dev/null \
89 | grep -v '^Author: ' \
90 | grep -vE 'scan "|HITS=|grep -E|P_ROOT=|P_WT=|\$ALL' \
91 > "$SCAN_TMP" || : > "$SCAN_TMP"
92HITS=0
93scan() { # scan <label> <regex>
94 local out
95 out=$(grep -Eo "$2" "$SCAN_TMP" 2>/dev/null | sort -u | head -5 || true)
96 if [ -n "$out" ]; then
97 printf ' \033[31mHIT\033[0m %s\n' "$1"
98 printf '%s\n' "$out" | sed 's/^/ /'
99 HITS=$((HITS + 1))
100 else
101 printf ' ok %s\n' "$1"
102 fi
103}
104scan "LAN IPs 192.168.x.x" '192\.168\.[0-9]+\.[0-9]+'
105scan "private 10.x.x.x" '\b10\.[0-9]+\.[0-9]+\.[0-9]+'
106scan "private 172.16-31.x.x" '172\.(1[6-9]|2[0-9]|3[01])\.[0-9]+\.[0-9]+'
107scan "GitHub PAT" 'ghp_[A-Za-z0-9]{36}'
108scan "HuggingFace token" 'hf_[A-Za-z0-9]{30,}'
109scan "embedded git credentials" 'scorpioxinc:[A-Za-z0-9]{20,}'
110scan "hard-coded ssh password" 'sshpass -p [^"$]'
111P_ROOT="/codebases"
112P_PICOBOT="${P_ROOT}/pico""bot"
113P_WT=".work""trees"
114scan "internal fleet paths" "/root/tools|${P_PICOBOT}|${P_WT}"
115scan "run-token env assignment" 'RUNNER_'"PASS="
116if [ "$HITS" -ne 0 ]; then
117 die "secret scan found $HITS problem(s) — refusing to publish"
118fi
119echo " clean: 0 hits"
120
121# ---------------------------------------------------------------- 2. build
122say "2/7 build targets"
123
124build_ok() { [ -f "$1" ]; }
125
126# linux-x86_64 (glibc, native)
127if command -v cc >/dev/null 2>&1; then
128 cc -O2 -std=c99 -Wall -Wextra -o "$STAGE/$ID" src/$ID.c || die "native build failed"
129 echo " built linux-x86_64 (glibc) $(wc -c < "$STAGE/$ID" | tr -d ' ') bytes"
130else
131 die "no native cc found"
132fi
133
134# linux-x86_64-musl (fully static — the universal Linux artifact)
135if command -v musl-gcc >/dev/null 2>&1; then
136 musl-gcc -O2 -std=c99 -Wall -Wextra -static -o "$STAGE/$ID.musl" src/$ID.c \
137 || die "musl build failed"
138 echo " built linux-x86_64-musl $(wc -c < "$STAGE/$ID.musl" | tr -d ' ') bytes"
139else
140 echo " skip linux-x86_64-musl (no musl-gcc)"
141fi
142
143# linux-arm64-musl (static aarch64 - Raspberry Pi 5 / ARM64 servers).
144# Prefer musl; on a host that only has the Debian cross toolchain the static
145# glibc link still yields a self-contained aarch64 ELF.
146if command -v aarch64-linux-musl-gcc >/dev/null 2>&1; then
147 aarch64-linux-musl-gcc -O2 -std=c99 -Wall -Wextra -static -o "$STAGE/$ID.arm64" src/$ID.c \
148 || die "arm64 musl build failed"
149 echo " built linux-arm64-musl $(wc -c < "$STAGE/$ID.arm64" | tr -d ' ') bytes"
150elif command -v aarch64-linux-gnu-gcc >/dev/null 2>&1; then
151 aarch64-linux-gnu-gcc -O2 -std=c99 -Wall -Wextra -static -o "$STAGE/$ID.arm64" src/$ID.c \
152 || die "arm64 static build failed"
153 echo " built linux-arm64-static $(wc -c < "$STAGE/$ID.arm64" | tr -d ' ') bytes"
154else
155 echo " skip linux-arm64-musl (no aarch64 cross compiler)"
156fi
157
158# windows-x86_64 (static PE)
159if command -v x86_64-w64-mingw32-gcc >/dev/null 2>&1; then
160 x86_64-w64-mingw32-gcc -O2 -std=c99 -Wall -Wextra -static -o "$STAGE/$ID.exe" src/$ID.c \
161 || die "MinGW build failed"
162 [ "$(head -c 2 "$STAGE/$ID.exe")" = "MZ" ] || die "windows artifact is not a PE"
163 echo " built windows-x86_64 $(wc -c < "$STAGE/$ID.exe" | tr -d ' ') bytes"
164else
165 echo " skip windows-x86_64 (no MinGW cross compiler)"
166fi
167
168# macOS legs — Mach-O must be produced by Apple clang on a real Mac.
169# Both slices are cross-built from one host: -arch arm64 and -arch x86_64.
170if [ "$DO_MACOS" -eq 1 ] && [ -n "${MAC_HOST:-}" ]; then
171 MAC_USER="${MAC_USER:-$(whoami)}"
172 MAC_DIR="/tmp/${ID}-mac-$$"
173 echo " building macOS legs on $MAC_HOST"
174 SSH_MAC=(ssh -o StrictHostKeyChecking=no)
175 SCP_MAC=(scp -o StrictHostKeyChecking=no)
176 if [ -n "${MAC_PASS:-}" ]; then
177 SSH_MAC=(scorpiox-sshpass -p "$MAC_PASS" "${SSH_MAC[@]}")
178 SCP_MAC=(scorpiox-sshpass -p "$MAC_PASS" "${SCP_MAC[@]}")
179 fi
180 if "${SSH_MAC[@]}" "$MAC_USER@$MAC_HOST" "rm -rf '$MAC_DIR' && mkdir -p '$MAC_DIR'"; then
181 if "${SCP_MAC[@]}" src/$ID.c "$MAC_USER@$MAC_HOST:$MAC_DIR/$ID.c"; then
182 # Build straight from the uploaded file — no src/ tree on the remote.
183 for slice in arm64 x86_64; do
184 if "${SSH_MAC[@]}" "$MAC_USER@$MAC_HOST" \
185 "cd '$MAC_DIR' && clang -O2 -std=c99 -Wall -Wextra -arch $slice -o $ID.$slice $ID.c" \
186 2>/dev/null; then
187 "${SCP_MAC[@]}" "$MAC_USER@$MAC_HOST:$MAC_DIR/$ID.$slice" "$STAGE/$ID.macos-$slice" 2>/dev/null \
188 && echo " built macos-$slice ($(wc -c < "$STAGE/$ID.macos-$slice" | tr -d ' ') bytes)"
189 else
190 echo " warn: macos-$slice build failed on $MAC_HOST"
191 fi
192 done
193 "${SSH_MAC[@]}" "$MAC_USER@$MAC_HOST" "rm -rf '$MAC_DIR'" 2>/dev/null || true
194 else
195 echo " warn: mac scp failed"
196 fi
197 else
198 echo " warn: mac host unreachable"
199 fi
200else
201 echo " skip macOS legs (set MAC_HOST/MAC_USER/MAC_PASS to include them)"
202fi
203
204# ---------------------------------------------------------------- 3. package
205say "3/7 package"
206
207git archive --format=tar.gz --prefix="${ID}-${VERSION}/" \
208 -o "$STAGE/source.tar.gz" HEAD 2>/dev/null \
209 || tar -czf "$STAGE/source.tar.gz" --exclude=.git .
210echo " source.tar.gz $(wc -c < "$STAGE/source.tar.gz" | tr -d ' ') bytes"
211
212target_meta() { # target_meta <key> <file> <format> <relpath> <name>
213 local key="$1" file="$2" fmt="$3" rel="$4" name="$5"
214 [ -f "$file" ] || return 0
215 local sha size
216 sha=$(sha256sum "$file" | awk '{print $1}')
217 size=$(wc -c < "$file" | tr -d ' ')
218 printf ' "%s": {"url": "%s/%s/%s/%s", "sha256": "%s", "size_bytes": %s, "format": "%s"}' \
219 "$key" "$DIST_BASE_URL" "$SLUG" "$VERSION" "$rel" "$sha" "$size" "$fmt"
220}
221
222{
223 printf '{\n'
224 printf ' "slug": "%s",\n' "$SLUG"
225 printf ' "id": "%s",\n' "$ID"
226 printf ' "name": "nvtop",\n'
227 printf ' "desc": "Local GPUs",\n'
228 printf ' "title": "Local GPU Telemetry",\n'
229 printf ' "summary": "Zero-dependency local GPU dashboard: probes nvidia-smi, rocm-smi and Apple Silicon ioreg on the node it runs on, charts per-GPU compute and VRAM as rolling sparklines, and lists every compute process with its GPU, PID and VRAM. Degrades to a clean explanatory empty state on CPU-only nodes.",\n'
230 printf ' "category": "system",\n'
231 printf ' "version": "%s",\n' "$VERSION"
232 printf ' "license": "MIT",\n'
233 printf ' "trust_notice": "Executes native C code on your node. Runs the fixed commands nvidia-smi, rocm-smi and ioreg locally and parses their output; makes zero outbound network requests, opens no sockets, runs no remote commands and reads no credentials.",\n'
234 printf ' "capabilities": ["local_gpu_query", "local_process_list"],\n'
235 printf ' "git_repo_url": "https://plugingit.scorpiox.net/scorpiox-bot-plugin-%s.git",\n' "$SLUG"
236 printf ' "git_web_url": "https://plugingit.scorpiox.net/repo?name=scorpiox-bot-plugin-%s",\n' "$SLUG"
237 printf ' "git_commit": "%s",\n' "$COMMIT"
238 printf ' "source_tarball_url": "%s/%s/%s/source.tar.gz",\n' "$DIST_BASE_URL" "$SLUG" "$VERSION"
239 printf ' "source_tarball_sha256": "%s",\n' "$(sha256sum "$STAGE/source.tar.gz" | awk '{print $1}')"
240 printf ' "build_cmd_posix": "cc -O2 -std=c99 -Wall -Wextra -o %s src/%s.c",\n' "$ID" "$ID"
241 printf ' "build_cmd_win64": "x86_64-w64-mingw32-gcc -O2 -std=c99 -static -o %s.exe src/%s.c",\n' "$ID" "$ID"
242 printf ' "published_at": "%s",\n' "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
243 printf ' "targets": {\n'
244 first=1
245 emit() { if [ -f "$2" ]; then [ $first -eq 1 ] || printf ',\n'; first=0; target_meta "$@"; fi; }
246 emit "linux-x86_64" "$STAGE/$ID" "elf-x86_64" "linux-x86_64/$ID" "$ID"
247 emit "linux-x86_64-musl" "$STAGE/$ID.musl" "elf-x86_64-static" "linux-x86_64-musl/$ID" "$ID"
248 emit "linux-arm64-musl" "$STAGE/$ID.arm64" "elf-arm64-static" "linux-arm64-musl/$ID" "$ID"
249 emit "macos-arm64" "$STAGE/$ID.macos-arm64" "macho-arm64" "macos-arm64/$ID" "$ID"
250 emit "macos-x86_64" "$STAGE/$ID.macos-x86_64" "macho-x86_64" "macos-x86_64/$ID" "$ID"
251 emit "windows-x86_64" "$STAGE/$ID.exe" "pe-x86_64" "windows-x86_64/$ID.exe" "$ID"
252 printf '\n }\n}\n'
253} > "$STAGE/manifest.json"
254
255python3 -c 'import json,sys; json.load(open(sys.argv[1]))' "$STAGE/manifest.json" \
256 || die "generated manifest.json is not valid JSON"
257echo " manifest.json ok"
258
259# SHA256SUMS — relative paths, exactly as published
260( cd "$STAGE"
261 for f in source.tar.gz; do [ -f "$f" ] && sha256sum "$f"; done
262 [ -f "$ID" ] && sha256sum "$ID" | sed "s| $ID\$| linux-x86_64/$ID|"
263 [ -f "$ID.musl" ] && sha256sum "$ID.musl" | sed "s| $ID.musl\$| linux-x86_64-musl/$ID|"
264 [ -f "$ID.arm64" ] && sha256sum "$ID.arm64" | sed "s| $ID.arm64\$| linux-arm64-musl/$ID|"
265 [ -f "$ID.macos-arm64" ]&& sha256sum "$ID.macos-arm64"| sed "s| $ID.macos-arm64\$| macos-arm64/$ID|"
266 [ -f "$ID.macos-x86_64" ]&& sha256sum "$ID.macos-x86_64"| sed "s| $ID.macos-x86_64\$| macos-x86_64/$ID|"
267 [ -f "$ID.exe" ] && sha256sum "$ID.exe" | sed "s| $ID.exe\$| windows-x86_64/$ID.exe|"
268 true ) > "$STAGE/SHA256SUMS"
269echo " SHA256SUMS $(wc -l < "$STAGE/SHA256SUMS" | tr -d ' ') entries"
270
271# ---------------------------------------------------------------- 4. stage
272say "4/7 stage tree"
273PKG="$STAGE/pkg"
274mkdir -p "$PKG/linux-x86_64" "$PKG/linux-x86_64-musl" "$PKG/linux-arm64-musl" \
275 "$PKG/macos-arm64" "$PKG/macos-x86_64" "$PKG/windows-x86_64"
276cp -f "$STAGE/$ID" "$PKG/linux-x86_64/$ID"
277[ -f "$STAGE/$ID.musl" ] && cp -f "$STAGE/$ID.musl" "$PKG/linux-x86_64-musl/$ID"
278[ -f "$STAGE/$ID.arm64" ] && cp -f "$STAGE/$ID.arm64" "$PKG/linux-arm64-musl/$ID"
279[ -f "$STAGE/$ID.macos-arm64" ]&& cp -f "$STAGE/$ID.macos-arm64" "$PKG/macos-arm64/$ID"
280[ -f "$STAGE/$ID.macos-x86_64" ]&&cp -f "$STAGE/$ID.macos-x86_64" "$PKG/macos-x86_64/$ID"
281[ -f "$STAGE/$ID.exe" ] && cp -f "$STAGE/$ID.exe" "$PKG/windows-x86_64/$ID.exe"
282cp -f "$STAGE/manifest.json" "$STAGE/SHA256SUMS" "$STAGE/source.tar.gz" "$PKG/"
283chmod +x "$PKG"/*/$ID 2>/dev/null || true
284find "$PKG" -type f | sed 's/^/ /'
285
286if [ "$DRY_RUN" -eq 1 ]; then
287 say "dry run — staged at $STAGE/pkg (kept for inspection)"
288 trap - EXIT
289 exit 0
290fi
291
292# ---------------------------------------------------------------- 5. upload
293say "5/7 upload"
294
295[ -n "$DIST_HOST" ] || die "DIST_HOST is not set — cannot upload"
296SSH=(ssh -o StrictHostKeyChecking=no)
297SCP=(scp -o StrictHostKeyChecking=no)
298if [ -n "$DIST_PASS" ]; then
299 SSH=(scorpiox-sshpass -p "$DIST_PASS" "${SSH[@]}")
300 SCP=(scorpiox-sshpass -p "$DIST_PASS" "${SCP[@]}")
301fi
302REMOTE_DIR="$DIST_PATH/bot-plugins/$SLUG/$VERSION"
303
304"${SSH[@]}" "$DIST_HOST" "mkdir -p '$REMOTE_DIR' '$DIST_PATH/bot-plugins/$SLUG'" \
305 || die "cannot create $REMOTE_DIR on $DIST_HOST"
306# Stage to one tarball, transfer it, extract remotely. Streaming tar through
307# ssh corrupts on some OpenSSH builds (remote gzip dies with SIGPIPE), and
308# OpenSSH 9 refuses to scp a bare "." source.
309tar -czf "$STAGE/pkg.tar.gz" -C "$PKG" . || die "packaging failed"
310"${SCP[@]}" -q "$STAGE/pkg.tar.gz" "$DIST_HOST:$REMOTE_DIR/pkg.tar.gz" || die "upload failed"
311"${SSH[@]}" "$DIST_HOST" "cd '$REMOTE_DIR' && tar -xzf pkg.tar.gz && rm -f pkg.tar.gz" \
312 || die "remote extract failed"
313echo " uploaded to $DIST_HOST:$REMOTE_DIR"
314
315# latest.json = copy of this version's manifest
316"${SSH[@]}" "$DIST_HOST" "cp -f '$REMOTE_DIR/manifest.json' '$DIST_PATH/bot-plugins/$SLUG/latest.json'" \
317 || die "latest.json update failed"
318echo " updated bot-plugins/$SLUG/latest.json"
319
320# index.json — merge, preserving every sibling <slug>/latest.json
321say "index.json merge"
322"${SSH[@]}" "$DIST_HOST" "cd '$DIST_PATH/bot-plugins' && python3 - '$SLUG' <<'PY'
323import json, os, sys, glob
324slug = sys.argv[1]
325entries = {}
326for p in sorted(glob.glob('*/latest.json')):
327 s = os.path.dirname(p)
328 try:
329 entries[s] = json.load(open(p))
330 except Exception:
331 pass
332index = {
333 'ok': True,
334 'service': 'bot-plugins-dist',
335 'dist_base_url': 'https://dist.scorpiox.net/bot-plugins',
336 'count': len(entries),
337 'slugs': sorted(entries),
338 'plugins': [entries[k] for k in sorted(entries)],
339}
340open('index.json.tmp', 'w').write(json.dumps(index, indent=2) + chr(10))
341os.replace('index.json.tmp', 'index.json')
342print(' index.json now has %d plugin(s): %s' % (len(entries), ', '.join(sorted(entries))))
343PY" || die "index.json merge failed"
344
345# ---------------------------------------------------------------- 6. mirror
346say "6/7 plugingit mirror"
347if [ "$DO_MIRROR" -eq 1 ] && [ -f "$PLUGINGIT_TOKEN_FILE" ]; then
348 TOKEN=$(tr -d ' \r\n' < "$PLUGINGIT_TOKEN_FILE")
349 # The push URL user component must literally be "token" (or empty). A bare
350 # https://<PAT>@host and https://x-access-token:<PAT>@host are both rejected
351 # by plugingit's git handler with "could not read Password".
352 PUSH_URL=$(printf '%s' "$PLUGINGIT_REMOTE" | sed "s|https://|https://token:${TOKEN}@|")
353 API_BASE=$(printf '%s' "$PLUGINGIT_REMOTE" | sed 's|\(https://[^/]*\).*|\1|')
354
355 mirror_push() {
356 git -c http.version=HTTP/1.1 push --all "$PUSH_URL" 2>&1 | sed 's/^/ /'
357 }
358 if ! mirror_push; then
359 # A first release has no repo on plugingit yet. Create it (auth via the
360 # publisher token) and retry once. The API needs a request body and the
361 # header form "Authorization: token <PAT>".
362 echo " repo missing on plugingit - creating it"
363 curl -sS --http1.1 -X POST -H "Authorization: token $TOKEN" --data '' \
364 "$API_BASE/api?r=repos&name=$(basename "$PLUGINGIT_REMOTE" .git)" \
365 | sed 's/^/ /'
366 echo
367 mirror_push || die "mirror push failed"
368 fi
369 git -c http.version=HTTP/1.1 push --tags "$PUSH_URL" 2>&1 | sed 's/^/ /' || true
370 echo " mirrored to $PLUGINGIT_REMOTE"
371else
372 echo " skip (no $PLUGINGIT_TOKEN_FILE or --no-mirror)"
373fi
374
375# ---------------------------------------------------------------- 7. verify
376say "7/7 verify"
377CODE=$(curl -fsS -o "$STAGE/latest.check" -w '%{http_code}' \
378 "$DIST_BASE_URL/$SLUG/latest.json" || echo 000)
379if [ "$CODE" = "200" ]; then
380 python3 -c 'import json,sys; d=json.load(open(sys.argv[1])); print(" latest.json OK — %s v%s, %d target(s)" % (d["slug"], d["version"], len(d["targets"])))' \
381 "$STAGE/latest.check" || echo " warn: latest.json is not valid JSON"
382else
383 echo " warn: $DIST_BASE_URL/$SLUG/latest.json returned HTTP $CODE"
384fi
385
386printf '\n\033[1mrelease complete\033[0m\n'
387printf ' registry %s/%s/%s/\n' "$DIST_BASE_URL" "$SLUG" "$VERSION"
388printf ' manifest %s/%s/%s/manifest.json\n' "$DIST_BASE_URL" "$SLUG" "$VERSION"