-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.sh
More file actions
executable file
·62 lines (53 loc) · 1.6 KB
/
package.sh
File metadata and controls
executable file
·62 lines (53 loc) · 1.6 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
#!/bin/bash
# Package script for ChatGPT Graph Extension
# Creates a .zip file ready for Chrome Web Store submission
echo "📦 Packaging ChatGPT Graph Extension..."
# Check if icons exist
if [ ! -f "icons/icon16.png" ] || [ ! -f "icons/icon48.png" ] || [ ! -f "icons/icon128.png" ]; then
echo "⚠️ Warning: Icon files missing!"
echo "Please generate icons first:"
echo " 1. Open generate-icons.html in a browser"
echo " 2. Download all three PNG files"
echo " 3. Place them in the icons/ folder"
echo ""
read -p "Continue anyway? (y/N) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
# Create dist directory
mkdir -p dist
# Package name with version and date
VERSION=$(grep '"version"' manifest.json | sed 's/.*"version": "\(.*\)".*/\1/')
PACKAGE_NAME="chatgpt-graph-extension-v${VERSION}-$(date +%Y%m%d).zip"
# Files to include
FILES=(
"manifest.json"
"content.js"
"popup.html"
"popup.js"
"styles/graph.css"
"lib/cytoscape.min.js"
"icons/icon16.png"
"icons/icon48.png"
"icons/icon128.png"
"LICENSE"
"README.md"
"ARCHITECTURE.md"
)
# Create zip
echo "Creating ${PACKAGE_NAME}..."
zip -r "dist/${PACKAGE_NAME}" "${FILES[@]}" 2>/dev/null
if [ $? -eq 0 ]; then
echo "✅ Package created successfully!"
echo "📍 Location: dist/${PACKAGE_NAME}"
echo ""
echo "Next steps:"
echo " 1. Test the extension locally first"
echo " 2. Upload to Chrome Web Store Developer Dashboard"
echo " 3. Or share the .zip file for manual installation"
else
echo "❌ Packaging failed!"
exit 1
fi