mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-07-13 16:05:05 +00:00
27 lines
886 B
Bash
Executable file
27 lines
886 B
Bash
Executable file
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")"
|
|
cd ..
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Cargo build
|
|
touch crates/dm-langserver/build.rs
|
|
|
|
echo '==== Linux build ===='
|
|
cargo build --release --target x86_64-unknown-linux-musl -p dm-langserver
|
|
|
|
echo '==== Windows build ===='
|
|
cargo build --release --target x86_64-pc-windows-gnu -p dm-langserver
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Organize binaries into a directory for upload
|
|
echo '==== Organize files ===='
|
|
DEST=target/langserver-dist
|
|
rm -rf "$DEST"
|
|
mkdir -p "$DEST"
|
|
cp target/x86_64-unknown-linux-musl/release/dm-langserver "$DEST/x64-linux"
|
|
cp target/x86_64-pc-windows-gnu/release/dm-langserver.exe "$DEST/x64-win32.exe"
|
|
strip "$DEST/x64-linux"
|
|
x86_64-w64-mingw32-strip "$DEST/x64-win32.exe"
|
|
ls -lh --color=auto "$DEST"
|