Add debug builds
All checks were successful
continuous-integration/drone/tag Build is passing

This commit is contained in:
Tobias Manske 2023-03-24 23:32:10 +01:00
parent c3f536017a
commit 360c8b8668
Signed by: tobias
GPG Key ID: E83C743C1FC2F79A
3 changed files with 22 additions and 4 deletions

View File

@ -13,7 +13,7 @@ steps:
image: debian:bookworm
pull: always
commands:
- apt-get update && apt-get install -y zip
- apt-get update && apt-get install -y zip slugify
- ./build.sh
- name: Upload Artifact to Gitea
@ -25,7 +25,8 @@ steps:
from_secret: gitea_api_token
checksum: sha256
base_url: https://git.tobiasmanske.de
files: editor-preview.ankiaddon
files:
- "*.ankiaddon"
image_pull_secrets:
- registry

1
.gitignore vendored
View File

@ -169,3 +169,4 @@ tags
# Stores actual addon config if the src directory is symlinked into an anki installation during development
src/meta.json
src/manifest.json

View File

@ -1,11 +1,27 @@
#!/bin/bash
set -e
set -o nounset
SLUG=$(slugify "${DRONE_COMMIT_REF}")
if [ -d src/__pycache__ ]; then
rm -r src/__pycache__
fi
cd src
zip -r ../editor-preview.ankiaddon --exclude meta.json -- *
# 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 ..
unzip -l editor-preview.ankiaddon
echo "Ankiweb Contents"
unzip -l editor-preview-ankiweb.ankiaddon
echo "External Contents"
unzip -l editor-preview-external.ankiaddon