Add build script and remove widget duplicates
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
# Build the macOS Dashboard widget without duplicating code
|
||||
set -euo pipefail
|
||||
|
||||
WIDGET_NAME="CoBiEClock"
|
||||
SRC_DIR="macos-widget"
|
||||
BUILD_DIR="build-widget"
|
||||
|
||||
# Clean build directory
|
||||
rm -rf "$BUILD_DIR"
|
||||
mkdir "$BUILD_DIR"
|
||||
|
||||
# Copy unique widget files
|
||||
cp "$SRC_DIR/Info.plist" "$SRC_DIR/index.html" "$BUILD_DIR/"
|
||||
|
||||
# Copy shared files from repository root
|
||||
cp clock.js cobie.js style.css logo.svg "$BUILD_DIR/"
|
||||
|
||||
# Create archive and rename
|
||||
zip -r "${WIDGET_NAME}.zip" "$BUILD_DIR" > /dev/null
|
||||
mv "${WIDGET_NAME}.zip" "${WIDGET_NAME}.wdgt"
|
||||
|
||||
echo "Widget created: ${WIDGET_NAME}.wdgt"
|
||||
Reference in New Issue
Block a user