Files
global-autoresponder/scripts/package.sh
T
2026-06-02 19:19:00 +02:00

26 lines
661 B
Bash
Executable File

#!/bin/sh
set -eu
VERSION="$(awk -F= '$1=="version"{print $2}' plugin.conf)"
if [ -z "$VERSION" ]; then
echo "Cannot determine version from plugin.conf" >&2
exit 1
fi
if [ ! -f images/user_icon.svg ]; then
echo "Missing user-supplied icon: src/images/user_icon.svg" >&2
exit 1
fi
ROOT_DIR="$(cd .. && pwd)"
mkdir -p "$ROOT_DIR/archives/$VERSION"
tar -czf "$ROOT_DIR/archives/$VERSION/global-autoresponder.tar.gz" \
--exclude='./.git' \
--exclude='./tests' \
--exclude='./data' \
--exclude='./state' \
--exclude='./logs' \
--exclude='./*.log' \
--exclude='./.DS_Store' \
.
echo "$ROOT_DIR/archives/$VERSION/global-autoresponder.tar.gz"