Linux + iPhone Continuity / iMessage / SMS
add chrome build
Zack Bartelca7892fb4b40
diff --git a/extension/build.sh b/extension/build.shindex 1914f6a..dc2814c 100755--- a/extension/build.sh+++ b/extension/build.sh@@ -1,26 +1,24 @@#!/bin/bash-set -e+set -eecho "Building Tether Extensions..."-# Ensure build directories existBUILD_DIR="build/extension"BROWSER_DIR="$BUILD_DIR/browser"MAIL_DIR="$BUILD_DIR/mail"+CHROME_DIR="$BUILD_DIR/chrome"mkdir -p "$BROWSER_DIR/src/background" "$BROWSER_DIR/src/content"mkdir -p "$MAIL_DIR/src/background" "$MAIL_DIR/src/mail"+mkdir -p "$CHROME_DIR/src/background" "$CHROME_DIR/src/content"-# Bundle Browser Extension-echo "Bundling browser extension..."+# Bundle Firefox Browser Extension+echo "Bundling Firefox browser extension..."npx esbuild extension/src/background/background.js --bundle --outfile="$BROWSER_DIR/src/background/background.js"npx esbuild extension/src/content/autofill.js --bundle --outfile="$BROWSER_DIR/src/content/autofill.js"cp extension/manifest-browser.json "$BROWSER_DIR/manifest.json"--# Copy static assets safelyif [ -d "extension/icons" ]; then cp -R extension/icons "$BROWSER_DIR/"; fiif [ -d "extension/popup" ]; then cp -R extension/popup "$BROWSER_DIR/"; fi-(cd "$BROWSER_DIR" && zip -qr ../tether-browser-extension.zip .)# Bundle Mail Extension@@ -28,10 +26,20 @@ echo "Bundling mail extension..."npx esbuild extension/src/background/background.js --bundle --outfile="$MAIL_DIR/src/background/background.js"npx esbuild extension/src/mail/extractor.js --bundle --outfile="$MAIL_DIR/src/mail/extractor.js"cp extension/manifest-mail.json "$MAIL_DIR/manifest.json"-if [ -d "extension/icons" ]; then cp -R extension/icons "$MAIL_DIR/"; fiif [ -d "extension/popup" ]; then cp -R extension/popup "$MAIL_DIR/"; fi-(cd "$MAIL_DIR" && zip -qr ../tether-mail-extension.xpi .)+# Bundle Chrome Extension (Web Store upload)+echo "Bundling Chrome extension..."+npx esbuild extension/src/background/background.js --bundle --outfile="$CHROME_DIR/src/background/background.js"+npx esbuild extension/src/content/autofill.js --bundle --outfile="$CHROME_DIR/src/content/autofill.js"+cp extension/manifest-browser.json "$CHROME_DIR/manifest.json"+if [ -d "extension/icons" ]; then cp -R extension/icons "$CHROME_DIR/"; fi+if [ -d "extension/popup" ]; then cp -R extension/popup "$CHROME_DIR/"; fi+(cd "$CHROME_DIR" && zip -qr ../tether-chrome-extension.zip .)+echo "Extensions successfully built and packaged in $BUILD_DIR"+echo " Firefox browser: $BUILD_DIR/tether-browser-extension.zip"+echo " Thunderbird: $BUILD_DIR/tether-mail-extension.xpi"+echo " Chrome (Store): $BUILD_DIR/tether-chrome-extension.zip"