-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (29 loc) · 1.21 KB
/
Makefile
File metadata and controls
37 lines (29 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
setup:
pnpm install
cargo binstall cargo-watch
cargo binstall sqlx-cli
sqlx db create
sqlx migrate run
cargo build
tailwind:
npx @tailwindcss/cli -i ./ui/styles/tailwind.css -o ./ui/assets/main.css
tailwind-watch:
npx @tailwindcss/cli -i ./ui/styles/tailwind.css -o ./ui/assets/main.css --watch
server-watch:
RUST_LOG=info cargo watch -x run
build-windows:
echo "🦀 Building Rust project..."
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
# Linux commands (without inno):
VERSION=$(grep '^version' Cargo.toml | head -n1 | cut -d '"' -f2)
sed "s/{#AppVersion}/$VERSION/" build/windows_template.iss > build/windows_installer.iss
# Window commands:
# $versionLine = Get-Content Cargo.toml | Where-Object { $_ -match '^version\s*=' } | Select-Object -First 1
# $version = $versionLine -replace '^version\s*=\s*"(.*)"', '$1'
# (Get-Content build\windows_template.iss) -replace '\{#AppVersion\}', $version | Set-Content build\windows_installer.iss
# & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" ".\build\windows_installer.iss"
echo "✅ Done!"
build-linux:
rustup target add x86_64-unknown-linux-gnu
cargo build --release --target x86_64-unknown-linux-gnu