.PHONY: build clean package # Repository details - change as needed CLOUDRON_APP_ID = dev.maunium.whatsapp.cloudronapp CLOUDRON_TOKEN ?= # For development, we'll use the current git commit as the version GIT_COMMIT = $(shell git rev-parse --short HEAD 2>/dev/null || echo "dev") VERSION ?= dev-$(GIT_COMMIT) # Docker image for cloudron package building CLOUDRON_BUILDER_IMAGE = cloudron/package-builder:5.0.0 all: build build: docker build -t $(CLOUDRON_APP_ID) -f Dockerfile.cloudron . # Clean build artifacts clean: rm -rf build.log latest.tgz # Package for Cloudron in a consistent environment package: @mkdir -p build docker run --rm -v "$(PWD):/app" $(CLOUDRON_BUILDER_IMAGE) build --set-version $(VERSION) # For development - install directly in a test Cloudron dev-install: package cloudron install --image $(CLOUDRON_APP_ID) --location whatsapp.example.com # Update the app in a dev Cloudron dev-update: cloudron update --app whatsapp.example.com --image $(CLOUDRON_APP_ID) # Publish to a Cloudron app store (requires token) publish: @if [ -z "$(CLOUDRON_TOKEN)" ]; then echo "CLOUDRON_TOKEN is not set"; exit 1; fi cloudron appstore publish --app $(CLOUDRON_APP_ID) --token $(CLOUDRON_TOKEN)