Files
telegram-gateway/Makefile
Gabriel Radureau 13dc7aee13
All checks were successful
Docker Build / build-and-push-image (push) Successful in 44s
rename: homelab-gateway → telegram-gateway
Aligns the project name with the public URL (tg.arcodange.fr) and the
Arcodange organization conventions. The 'homelab-gateway' name was too
generic.

Touches: chart name + helpers, image registry path, Go module path,
secret/configmap names, deployment mountPath, all docs.
2026-05-09 12:35:03 +02:00

39 lines
905 B
Makefile

SHELL := /bin/bash
APP := telegram-gateway
IMAGE := gitea.arcodange.lab/arcodange/$(APP)
TAG ?= dev
.PHONY: build test vet tidy run docker push setwebhook deletewebhook
build:
go build -o bin/gateway .
test:
go test ./...
vet:
go vet ./...
tidy:
go mod tidy
run: build
CONFIG_PATH=./bots.example.yaml ./bin/gateway serve
docker:
docker build -t $(IMAGE):$(TAG) .
push: docker
docker push $(IMAGE):$(TAG)
# Usage: make setwebhook SLUG=echo BASE_URL=https://tg.arcodange.fr
# BOT_<SLUG>_TOKEN and BOT_<SLUG>_SECRET must be exported in your shell.
setwebhook:
@test -n "$(SLUG)" || (echo "SLUG=<bot-slug> required" && exit 1)
@test -n "$(BASE_URL)" || (echo "BASE_URL=https://… required" && exit 1)
go run . setwebhook --slug $(SLUG) --base-url $(BASE_URL)
deletewebhook:
@test -n "$(SLUG)" || (echo "SLUG=<bot-slug> required" && exit 1)
go run . deletewebhook --slug $(SLUG)