Files
Skald-Circle/build.sh
T
dguiducci fb3eeeeec6
Nightly Build / build (push) Failing after 6s
Refactor: remove desktop/Tauri bundle, add i18n, CI/CD pipeline
- Remove desktop (Tauri) bundle: docs/desktop.md, icons/, tauri.conf.json,
  src/desktop/mod.rs, gen/schemas/
- Remove build.rs (no longer needed)
- Add i18n system (crates/core-api, plugin-mobile-connector, web)
- Refactor config system (src/config.rs, boot_format.rs)
- Add mobile connector features (app, router, device pairing)
- Plugin system improvements (skald-core)
- Update dependencies (Cargo.lock, Cargo.toml)
- CI/CD: Gitea Actions workflows (nightly + release), package.sh,
  verify-version.sh, builds.skaldagent.net config
2026-07-19 22:35:06 +01:00

57 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env sh
# Build Skald and install the binary into ./bin.
#
# ./build.sh release build → bin/skald
# ./build.sh -d debug build → bin/skald
#
# Extra args after the profile flag are forwarded to the server cargo build.
#
# The binary is staged as bin/skald.new and renamed into place. A plain `cp`
# over a live binary fails with ETXTBSY on Linux, and rebuilding while run.sh
# supervises a running instance is the normal workflow: build here, then ask
# the agent to restart — the supervisor re-executes the new binary.
set -eu
cd "$(dirname "$0")"
OUT_DIR="bin"
PROFILE="release"
if [ "${1:-}" = "-d" ]; then
PROFILE="debug"
shift
fi
# Warnings are noise in a tight build/restart loop; errors still fail the build.
RUSTFLAGS="-A warnings"
export RUSTFLAGS
# The server takes any forwarded args; the setup wizard is a plain binary and is
# always built on its own, without them.
if [ "$PROFILE" = "release" ]; then
cargo build --release "$@"
cargo build --release -p skald-setup
else
cargo build "$@"
cargo build -p skald-setup
fi
# Stage as .new and rename into place: a plain cp over a live binary fails with
# ETXTBSY on Linux while run.sh supervises a running instance.
install_bin() {
src="target/$PROFILE/$1"
if [ ! -f "$src" ]; then
echo "[build.sh] Expected binary not found at $src" >&2
exit 1
fi
cp "$src" "$OUT_DIR/$1.new"
chmod 755 "$OUT_DIR/$1.new"
mv -f "$OUT_DIR/$1.new" "$OUT_DIR/$1"
echo "[build.sh] $PROFILE build installed → $OUT_DIR/$1"
}
mkdir -p "$OUT_DIR"
install_bin skald
install_bin skald-setup