This commit is contained in:
parent
c3f536017a
commit
360c8b8668
@ -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
1
.gitignore
vendored
@ -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
|
||||
|
20
build.sh
20
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 <<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
|
||||
|
Loading…
Reference in New Issue
Block a user