#!/bin/bash

# zip-plugin.sh — Bundles the plugin for distribution.
# Excludes development folders, lockfiles, and system files.

OUTPUT_ZIP="../tip-callout-plugin.zip"

echo "📦 Bundling plugin..."
zip -r "$OUTPUT_ZIP" . -x "node_modules/*" "package-lock.json" "zip-plugin.sh" "*.log" ".DS_Store"

if [ $? -eq 0 ]; then
  echo "✅ Successfully packaged plugin to $OUTPUT_ZIP"
else
  echo "❌ Failed to package plugin"
  exit 1
fi
