build: exclude screenshots folder from extension distribution package

This commit is contained in:
2026-08-23 14:54:35 -07:00
parent 8cde6f1034
commit d8e734abe5
5 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -27,8 +27,10 @@ if [ -n "$STAGED_FILES" ]; then
while IFS= read -r file; do
[ -z "$file" ] && continue
# Check for forbidden export data files & raw media
if [[ "$file" =~ (activities\.csv|activities\.json|exporter_job_info\.json|\.zip$|\.crx$|\.mp4$|\.mov$|\.webm$|\.heic$|\.jpg$|\.jpeg$) ]]; then
# Check for forbidden export data files & raw media (allow screenshots/ and icons/)
if [[ "$file" =~ ^(screenshots/|icons/) ]]; then
: # Allowed store & UI asset directory
elif [[ "$file" =~ (activities\.csv|activities\.json|exporter_job_info\.json|\.zip$|\.crx$|\.mp4$|\.mov$|\.webm$|\.heic$|\.jpg$|\.jpeg$) ]]; then
echo -e "${RED}❌ [DATA LEAK BLOCKED] Staged forbidden export/media file:${NC} $file"
ERRORS_FOUND=$((ERRORS_FOUND + 1))
fi