pipeline update

This commit is contained in:
2026-01-25 16:19:29 +01:00
parent 2fc241fee7
commit 351a443c64
2 changed files with 57 additions and 13 deletions

View File

@@ -25,6 +25,28 @@ $(OUTPUT): $(SRC) $(ORDER)
echo "" >> $(OUTPUT); \
done < $(ORDER)
export: build
@if [ -z "$(VERSION)" ]; then \
echo "ERROR: VERSION not set!"; \
exit 1; \
fi
@echo "==> Exporting HTML for version $(VERSION)"
@tic80 --cli --skip --fs=. \
--cmd="load $(OUTPUT) & save $(PROJECT)-$(VERSION) & export html $(PROJECT)-$(VERSION).html & exit"
@echo "==> Creating versioned files"
@if [ -f "$(PROJECT)-$(VERSION).tic" ]; then \
cp $(PROJECT)-$(VERSION).tic $(PROJECT).tic; \
fi
@if [ -f "$(PROJECT)-$(VERSION).html.zip" ]; then \
cp $(PROJECT)-$(VERSION).html.zip $(PROJECT).html.zip; \
fi
@echo "==> Generated files:"
@ls -lh $(PROJECT)-$(VERSION).* $(PROJECT).tic $(PROJECT).html.zip 2>/dev/null || true
watch:
make build
fswatch -o $(SRC_DIR) $(ORDER) assets | while read; do make build; done
import_assets:
@for t in $(ASSET_TYPES); do \
for f in $(ASSETS_DIR)/$$t/*.png; do \
@@ -45,10 +67,8 @@ export_assets: build
/^-- <MUSIC>/,/^-- <\/MUSIC>/p' \
$(OUTPUT) > $(ASSETS_LUA)
export: build
tic80 --cli --skip --fs=. \
--cmd="load $(OUTPUT) & save $(PROJECT) & export html $(PROJECT).html & exit"
clean:
@rm -f $(PROJECT)-*.tic $(PROJECT)-*.html.zip $(OUTPUT)
@echo "==> Cleaned build artifacts"
watch:
make build
fswatch -o $(SRC_DIR) $(ORDER) assets | while read; do make build; done
.PHONY: all build export watch import_assets export_assets clean