Fix: Ensure registration.yaml sender_localpart is always whatsappbot and update Makefile for build service

This commit is contained in:
Your Name
2025-07-21 10:32:02 -06:00
parent 8aa64ef515
commit d83f6892d6
2 changed files with 15 additions and 15 deletions

View File

@@ -1,39 +1,35 @@
.PHONY: build clean package
.PHONY: clean package dev-install dev-update publish
# Repository details - change as needed
CLOUDRON_APP_ID = dev.maunium.whatsapp.cloudronapp
CLOUDRON_IMAGE_REPO = andreasdueren/mautrix-whatsapp-cloudron
CLOUDRON_TOKEN ?=
BUILD_SERVICE_TOKEN = e3265de06b1d0e7bb38400539012a8433a74c2c96a17955e
# 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 .
all: package
# Clean build artifacts
clean:
rm -rf build.log latest.tgz
# Package for Cloudron in a consistent environment
# Package for Cloudron using the build service
package:
@mkdir -p build
docker run --rm -v "$(PWD):/app" $(CLOUDRON_BUILDER_IMAGE) build --set-version $(VERSION)
cloudron build --set-build-service builder.docker.due.ren --build-service-token $(BUILD_SERVICE_TOKEN) --set-repository $(CLOUDRON_IMAGE_REPO) --tag $(VERSION)
# For development - install directly in a test Cloudron
dev-install: package
cloudron install --image $(CLOUDRON_APP_ID) --location whatsapp.example.com
cloudron uninstall --app whatsapp.matrix.due.ren || true
cloudron install --location whatsapp.matrix.due.ren --image $(CLOUDRON_IMAGE_REPO):$(VERSION)
# Update the app in a dev Cloudron
dev-update:
cloudron update --app whatsapp.example.com --image $(CLOUDRON_APP_ID)
dev-update: package
cloudron update --app whatsapp.matrix.due.ren --image $(CLOUDRON_IMAGE_REPO):$(VERSION)
# 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)
cloudron appstore publish --app $(CLOUDRON_APP_ID) --token $(CLOUDRON_TOKEN)