-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·51 lines (43 loc) · 1.42 KB
/
Copy pathpackage.sh
File metadata and controls
executable file
·51 lines (43 loc) · 1.42 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
#!/bin/bash
# Distribution packaging script for Rollcutter - Crunchyroll Censor Assistant
# Creates a production-ready zip file for Chrome Web Store submission
set -e
VERSION=$(grep '"version"' manifest.json | sed -E 's/.*"([0-9.]+)".*/\1/')
OUTPUT_DIR="dist"
OUTPUT_ZIP="rollcutter-v${VERSION}.zip"
echo "==================================="
echo "Packaging Rollcutter - Crunchyroll Censor Assistant v${VERSION}"
echo "==================================="
# Clean previous builds
if [ -d "$OUTPUT_DIR" ]; then
echo "Removing previous build directory..."
rm -rf "$OUTPUT_DIR"
fi
if [ -f "$OUTPUT_ZIP" ]; then
echo "Removing previous zip file..."
rm -f "$OUTPUT_ZIP"
fi
echo "Building extension assets..."
npm run build
# Create zip archive
echo "Creating zip archive..."
cd "$OUTPUT_DIR"
zip -r "../$OUTPUT_ZIP" . -x "*.DS_Store" -x "__MACOSX/*"
cd ..
# Verify archive
echo ""
echo "==================================="
echo "Package created successfully!"
echo "==================================="
echo "Output: $OUTPUT_ZIP"
echo "Size: $(du -h "$OUTPUT_ZIP" | cut -f1)"
echo ""
echo "Contents:"
unzip -l "$OUTPUT_ZIP"
echo ""
echo "==================================="
echo "Next steps:"
echo "1. Test the package by loading $OUTPUT_DIR as unpacked extension"
echo "2. Review PACKAGING.md for submission instructions"
echo "3. Upload $OUTPUT_ZIP to Chrome Web Store Developer Dashboard"
echo "==================================="