-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·47 lines (34 loc) · 1.13 KB
/
build.sh
File metadata and controls
executable file
·47 lines (34 loc) · 1.13 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
#!/bin/bash
# Build script for CrowdAssist - Creates distribution packages for Chrome and Firefox
set -e # Exit on error
echo "🔨 Building CrowdAssist extension packages..."
echo ""
# Create dist directory if it doesn't exist
mkdir -p dist
# Clean previous builds
rm -f dist/crowdassist-chrome.zip
rm -f dist/crowdassist-firefox.zip
# Build for Chrome
echo "📦 Building Chrome package..."
cd extension
zip -r ../dist/crowdassist-chrome.zip . -x "manifest.firefox.json" -x "*.DS_Store"
cd ..
echo "✅ Chrome package: dist/crowdassist-chrome.zip"
echo ""
# Build for Firefox
echo "Building Firefox package..."
cd extension
# Temporarily rename Firefox manifest
cp manifest.json manifest.json.backup
cp manifest.firefox.json manifest.json
zip -r ../dist/crowdassist-firefox.zip . -x "manifest.json.backup" -x "manifest.firefox.json" -x "*.DS_Store"
# Restore original manifest
mv manifest.json.backup manifest.json
cd ..
echo "✅ Firefox package: dist/crowdassist-firefox.zip"
echo ""
# Show file sizes
echo "Package sizes:"
ls -lh dist/*.zip | awk '{print $9 " - " $5}'
echo ""
echo "Build complete! Packages are in the dist/ directory"