-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-extension.sh
More file actions
executable file
·56 lines (45 loc) · 1.26 KB
/
build-extension.sh
File metadata and controls
executable file
·56 lines (45 loc) · 1.26 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
#!/bin/bash
set -e
# Colors for output
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}Building Feedly Saved Opener Extension${NC}"
echo "========================================"
# Pre-build validation
echo "Running lint..."
npm run lint || { echo -e "${RED}Lint failed. Fix errors before building.${NC}"; exit 1; }
echo "Running tests..."
npm test || { echo -e "${RED}Tests failed. Fix errors before building.${NC}"; exit 1; }
echo ""
# Get version from manifest
VERSION=$(grep -o '"version": *"[^"]*"' manifest.json | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+')
echo -e "${YELLOW}Version: $VERSION${NC}"
# Create dist directory
echo "Creating dist directory..."
rm -rf dist
mkdir -p dist
# Package name
PACKAGE_NAME="feedly-saved-opener-v${VERSION}.zip"
# Files to include
echo "Packaging files..."
zip -r "dist/${PACKAGE_NAME}" \
manifest.json \
background.js \
popup/ \
icons/ \
LICENSE \
-x "*.DS_Store" \
-x "*~" \
-x "*/.*"
# Verify the package
echo ""
echo -e "${GREEN}Build complete!${NC}"
echo "Package: dist/${PACKAGE_NAME}"
echo ""
echo "Contents:"
unzip -l "dist/${PACKAGE_NAME}"
echo ""
echo -e "${GREEN}✓ Build successful${NC}"
echo "To install: Load dist/${PACKAGE_NAME} in Firefox via about:debugging"