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 image: debian:bookworm
pull: always pull: always
commands: commands:
- apt-get update && apt-get install -y zip - apt-get update && apt-get install -y zip slugify
- ./build.sh - ./build.sh
- name: Upload Artifact to Gitea - name: Upload Artifact to Gitea
@ -25,7 +25,8 @@ steps:
from_secret: gitea_api_token from_secret: gitea_api_token
checksum: sha256 checksum: sha256
base_url: https://git.tobiasmanske.de base_url: https://git.tobiasmanske.de
files: editor-preview.ankiaddon files:
- "*.ankiaddon"
image_pull_secrets: image_pull_secrets:
- registry - 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 # Stores actual addon config if the src directory is symlinked into an anki installation during development
src/meta.json src/meta.json
src/manifest.json

View File

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