forked from aldrin-labs/spl-token-wallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-extensions.sh
More file actions
executable file
·69 lines (55 loc) · 1.89 KB
/
build-extensions.sh
File metadata and controls
executable file
·69 lines (55 loc) · 1.89 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
#!/bin/bash
# Build script for cross-browser extensions
echo "Building SVMSeek Wallet for all browsers..."
# Clean previous builds
rm -rf extension/*/build
# Build the main React app
echo "Building React app..."
yarn build
if [ $? -ne 0 ]; then
echo "React build failed!"
exit 1
fi
echo "Building browser extensions..."
# Chrome Extension (Manifest V3)
echo "Building Chrome extension..."
mkdir -p extension/chrome/build
cp -a build/. extension/chrome/build/
cp -a extension/src/. extension/chrome/build/
cp extension/chrome/manifest.json extension/chrome/build/manifest.json
# Firefox Extension (Manifest V2)
echo "Building Firefox extension..."
mkdir -p extension/firefox/build
cp -a build/. extension/firefox/build/
cp -a extension/src/. extension/firefox/build/
cp extension/firefox/manifest.json extension/firefox/build/manifest.json
# Safari Extension (Manifest V2)
echo "Building Safari extension..."
mkdir -p extension/safari/build
cp -a build/. extension/safari/build/
cp -a extension/src/. extension/safari/build/
cp extension/safari/manifest.json extension/safari/build/manifest.json
# Edge Extension (Manifest V3)
echo "Building Edge extension..."
mkdir -p extension/edge/build
cp -a build/. extension/edge/build/
cp -a extension/src/. extension/edge/build/
cp extension/edge/manifest.json extension/edge/build/manifest.json
echo "Creating distribution packages..."
# Create zip files for distribution
cd extension
for browser in chrome firefox safari edge; do
if [ -d "$browser/build" ]; then
echo "Packaging $browser extension..."
cd "$browser/build"
zip -r "../../svmseek-wallet-$browser.zip" .
cd ../..
fi
done
cd ..
echo "Build complete!"
echo "Extension packages created:"
echo "- extension/svmseek-wallet-chrome.zip"
echo "- extension/svmseek-wallet-firefox.zip"
echo "- extension/svmseek-wallet-safari.zip"
echo "- extension/svmseek-wallet-edge.zip"