-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·56 lines (48 loc) · 1.55 KB
/
Copy pathbuild.sh
File metadata and controls
executable file
·56 lines (48 loc) · 1.55 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
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# Build script for Nodebook.js
# Usage: ./build.sh [platform] [arch]
# Example: ./build.sh darwin arm64
set -e
PLATFORM=${1:-"current"}
ARCH=${2:-"current"}
echo "🔨 Building Nodebook.js"
echo "Platform: $PLATFORM"
echo "Architecture: $ARCH"
echo ""
# Run prebuild step
echo "📋 Running prebuild..."
pnpm run prebuild
# Determine build command
if [ "$PLATFORM" = "current" ] && [ "$ARCH" = "current" ]; then
echo "🏗️ Building for current platform..."
pnpm run make
elif [ "$PLATFORM" = "darwin" ] && [ "$ARCH" = "x64" ]; then
echo "🍎 Building for macOS Intel..."
pnpm run make:darwin:x64
elif [ "$PLATFORM" = "darwin" ] && [ "$ARCH" = "arm64" ]; then
echo "🍎 Building for macOS Apple Silicon..."
pnpm run make:darwin:arm64
elif [ "$PLATFORM" = "win32" ] && [ "$ARCH" = "x64" ]; then
echo "🪟 Building for Windows x64..."
pnpm run make:win32:x64
elif [ "$PLATFORM" = "linux" ] && [ "$ARCH" = "x64" ]; then
echo "🐧 Building for Linux x64..."
pnpm run make:linux:x64
else
echo "❌ Unsupported platform/arch combination: $PLATFORM/$ARCH"
echo "Supported combinations:"
echo " - current current (build for current platform)"
echo " - darwin x64"
echo " - darwin arm64"
echo " - win32 x64"
echo " - linux x64"
exit 1
fi
echo ""
echo "✅ Build completed!"
echo "📦 Output files:"
if [ -d "out" ]; then
find out -name "*.exe" -o -name "*.dmg" -o -name "*.zip" -o -name "*.deb" -o -name "*.rpm" -o -name "*.AppImage" | head -10
else
echo "No output directory found"
fi