From 360c8b8668c055585e79ea69d30c931124d8805d Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Fri, 24 Mar 2023 23:32:10 +0100 Subject: [PATCH] Add debug builds --- .drone.yml | 5 +++-- .gitignore | 1 + build.sh | 20 ++++++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index f823bb4..8a99316 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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 diff --git a/.gitignore b/.gitignore index b3e14ec..3e56f12 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/build.sh b/build.sh index b36881b..50c66f2 100755 --- a/build.sh +++ b/build.sh @@ -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 <