generated from google-gemini/aistudio-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·97 lines (85 loc) · 2.58 KB
/
release.sh
File metadata and controls
executable file
·97 lines (85 loc) · 2.58 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/bin/bash
# Release script for Bando-Fi AI
# This script builds all platform versions for release
set -e
echo "======================================"
echo "Bando-Fi AI Release Build Script"
echo "======================================"
echo ""
# Get version from package.json
VERSION=$(node -p "require('./package.json').version")
echo "Building version: $VERSION"
echo ""
# Check if clean working directory
if [[ -n $(git status -s) ]]; then
echo "Warning: Working directory is not clean"
read -p "Continue anyway? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
echo "Step 1: Installing dependencies..."
npm install --legacy-peer-deps
echo ""
echo "Step 2: Running linters and tests..."
# Note: Add test commands here when tests are implemented
# npm test
echo ""
echo "Step 3: Building web application..."
npm run build:web
echo "✓ Web build complete"
echo ""
echo "Step 4: Building Windows executable..."
if [[ "$OSTYPE" == "win32" ]] || [[ "$OSTYPE" == "msys" ]] || command -v wine &> /dev/null; then
npm run dist:win
echo "✓ Windows build complete"
else
echo "⚠ Skipping Windows build (not on Windows and Wine not available)"
fi
echo ""
echo "Step 5: Syncing mobile platforms..."
npx cap sync
echo "✓ Mobile platforms synced"
echo ""
echo "Step 6: Building Android APK..."
if command -v java &> /dev/null; then
if [ -d "android" ] && [ -f "android/gradlew" ]; then
cd android
chmod +x gradlew
./gradlew assembleRelease
cd ..
echo "✓ Android APK build complete"
else
echo "⚠ Skipping Android build (Android project not found. Run 'npx cap add android' first)"
fi
else
echo "⚠ Skipping Android build (Java not available)"
fi
echo ""
echo "======================================"
echo "Build Summary"
echo "======================================"
echo ""
echo "Version: $VERSION"
echo ""
echo "Artifacts created:"
if [ -d "dist" ]; then
echo "✓ Web build: dist/"
fi
if [ -d "release" ]; then
echo "✓ Windows: release/"
ls -lh release/*.exe 2>/dev/null || echo " (no .exe files found)"
fi
if [ -f "android/app/build/outputs/apk/release/app-release-unsigned.apk" ]; then
echo "✓ Android: android/app/build/outputs/apk/release/app-release-unsigned.apk"
fi
echo ""
echo "Next steps:"
echo "1. Test all platform builds"
echo "2. Sign mobile apps (if not already signed)"
echo "3. Create git tag: git tag v$VERSION"
echo "4. Push tag: git push origin v$VERSION"
echo "5. Create GitHub release and upload artifacts"
echo ""
echo "======================================"