initial commit

This commit is contained in:
2026-06-09 00:04:11 +02:00
commit ebc288b54d
5 changed files with 179 additions and 0 deletions

37
Makefile Normal file
View File

@@ -0,0 +1,37 @@
# Targets:
# make - build the installable ZIP
# make clean - remove build artefacts
# make version - print current version read from addon.xml
ADDON_ID := $(shell grep -oP '(?<=id=")[^"]+' addon.xml | head -1)
ADDON_VERSION := $(shell grep -oP '(?<=version=")[^"]+' addon.xml | head -1).0
ZIP_NAME := $(ADDON_ID)-$(ADDON_VERSION).zip
DIST_DIR := dist
STAGE_DIR := $(DIST_DIR)/$(ADDON_ID)-$(ADDON_VERSION)
SRC_FILES := addon.py addon.xml resources
.PHONY: all zip clean version
all: zip
zip: $(DIST_DIR)/$(ZIP_NAME)
stage:
rm -rf $(STAGE_DIR)
mkdir -p $(STAGE_DIR)
cp -r $(SRC_FILES) $(STAGE_DIR)/
$(DIST_DIR)/$(ZIP_NAME): stage
cd $(DIST_DIR) && \
zip -r $(ZIP_NAME) $(ADDON_ID)-$(ADDON_VERSION) \
--exclude "*.pyc" \
--exclude "*/__pycache__/*" \
--exclude "*.DS_Store"
clean:
rm -rf $(DIST_DIR)
version:
@echo "$(ADDON_ID) v$(ADDON_VERSION)"