2021-09-13 02:18:29 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2023-03-24 23:32:10 +01:00
|
|
|
set -o nounset
|
|
|
|
|
|
|
|
SLUG=$(slugify "${DRONE_COMMIT_REF}")
|
2021-09-13 02:18:29 +02:00
|
|
|
|
|
|
|
if [ -d src/__pycache__ ]; then
|
|
|
|
rm -r src/__pycache__
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd src
|
2023-03-24 23:32:10 +01:00
|
|
|
|
|
|
|
# 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 -- *
|
2021-09-13 02:18:29 +02:00
|
|
|
cd ..
|
2023-03-24 23:32:10 +01:00
|
|
|
echo "Ankiweb Contents"
|
|
|
|
unzip -l editor-preview-ankiweb.ankiaddon
|
|
|
|
echo "External Contents"
|
|
|
|
unzip -l editor-preview-external.ankiaddon
|