bun-mariadb/publish.sh
2026-07-14 09:10:30 +01:00

25 lines
381 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
if [ -z "${1:-}" ]; then
msg="Updates"
else
msg="$1"
fi
tsc --noEmit
rm -rf dist
tsc
# Ensure CLI shebang survived compile
if ! head -1 dist/commands/index.js | grep -q '#!/usr/bin/env bun'; then
echo "ERROR: dist/commands/index.js is missing the bun shebang"
exit 1
fi
git add .
git commit -m "$msg" || true
git push
bun publish