-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
Β·44 lines (36 loc) Β· 1.02 KB
/
build.sh
File metadata and controls
executable file
Β·44 lines (36 loc) Β· 1.02 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
38
39
40
41
42
43
44
#!/bin/bash
# Production build script for JPad
# Builds for the current platform
set -e
echo "π Building JPad for production..."
echo "Platform: $(uname -s)"
echo ""
# Ensure Node 22 is available
if [ -n "$NVM_DIR" ]; then
# shellcheck source=/dev/null
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm use 22 2>/dev/null && echo "π’ Using Node $(node -v) via NVM"
elif command -v node &>/dev/null; then
echo "π‘ Using system Node $(node -v)"
else
echo "β Node.js not found. Please install Node 22+."
exit 1
fi
# Clean previous builds
echo "π§Ή Cleaning previous builds..."
rm -rf dist
rm -rf src-tauri/target/release/bundle
# Install dependencies if needed
if [ ! -d "node_modules" ]; then
echo "π¦ Installing dependencies..."
npm install
fi
# Build frontend
echo "π¨ Building frontend..."
npm run build
# Build Tauri app
echo "π¦ Building Tauri application..."
npm run tauri:build
echo ""
echo "β
Build complete!"
echo "π¦ Installers can be found in: src-tauri/target/release/bundle/"