editor-preview/build.sh
Tobias Manske 360c8b8668
All checks were successful
continuous-integration/drone/tag Build is passing
Add debug builds
2023-03-24 23:37:24 +01:00

28 lines
586 B
Bash
Executable File

#!/bin/bash
set -e
set -o nounset
SLUG=$(slugify "${DRONE_COMMIT_REF}")
if [ -d src/__pycache__ ]; then
rm -r src/__pycache__
fi
cd src
# Create Manifest
cat - > manifest.json <<EOF
{
"name": "Editor Live Preview - ${SLUG}",
"package": "editor-live-preview-${SLUG}"
}
EOF
zip -r ../editor-preview-external.ankiaddon --exclude meta.json -- *
zip -r ../editor-preview-ankiweb.ankiaddon --exclude meta.json --exclude manifest.json -- *
cd ..
echo "Ankiweb Contents"
unzip -l editor-preview-ankiweb.ankiaddon
echo "External Contents"
unzip -l editor-preview-external.ankiaddon