[Fix] Scanopy: Build generate-fixtures (#12686)

This commit is contained in:
Chris
2026-03-08 19:00:30 -04:00
committed by GitHub
parent 9217a0fb79
commit cc351a4817
2 changed files with 14 additions and 12 deletions

View File

@@ -53,6 +53,13 @@ function update_script() {
fi
sed -i 's|_TARGET=.*$|_URL=http://127.0.0.1:60072|' /opt/scanopy/.env
msg_info "Building Scanopy Server (patience)"
cd /opt/scanopy/backend
$STD cargo build --release --bin server --bin generate-fixtures
$STD ./target/release/generate-fixtures --output-dir /opt/scanopy/ui/src/lib/data
mv ./target/release/server /usr/bin/scanopy-server
msg_ok "Built Scanopy Server"
msg_info "Creating frontend UI"
export PUBLIC_SERVER_HOSTNAME=default
export PUBLIC_SERVER_PORT=""
@@ -61,12 +68,6 @@ function update_script() {
$STD npm run build
msg_ok "Created frontend UI"
msg_info "Building Scanopy Server (patience)"
cd /opt/scanopy/backend
$STD cargo build --release --bin server
mv ./target/release/server /usr/bin/scanopy-server
msg_ok "Built Scanopy Server"
if [[ -f /etc/systemd/system/scanopy-daemon.service ]]; then
fetch_and_deploy_gh_release "Scanopy Daemon" "scanopy/scanopy" "singlefile" "latest" "/usr/local/bin" "scanopy-daemon-linux-amd64"
mv "/usr/local/bin/Scanopy Daemon" /usr/local/bin/scanopy-daemon

View File

@@ -27,6 +27,13 @@ fetch_and_deploy_gh_release "Scanopy" "scanopy/scanopy" "tarball" "latest" "/opt
TOOLCHAIN="$(grep "channel" /opt/scanopy/backend/rust-toolchain.toml | awk -F\" '{print $2}')"
RUST_TOOLCHAIN=$TOOLCHAIN setup_rust
msg_info "Building Scanopy Server (patience)"
cd /opt/scanopy/backend
$STD cargo build --release --bin server --bin generate-fixtures
$STD ./target/release/generate-fixtures --output-dir /opt/scanopy/ui/src/lib/data
mv ./target/release/server /usr/bin/scanopy-server
msg_ok "Built Scanopy Server"
msg_info "Creating frontend UI"
export PUBLIC_SERVER_HOSTNAME=default
export PUBLIC_SERVER_PORT=""
@@ -35,12 +42,6 @@ $STD npm ci --no-fund --no-audit
$STD npm run build
msg_ok "Created frontend UI"
msg_info "Building Scanopy Server (patience)"
cd /opt/scanopy/backend
$STD cargo build --release --bin server
mv ./target/release/server /usr/bin/scanopy-server
msg_ok "Built Scanopy Server"
msg_info "Configuring server for first-run"
cat <<EOF >/opt/scanopy/.env
### - SERVER