holiday-api/makefile

22 lines
676 B
Makefile

# scripts for building app
# requires go 1.22+ and git installed
VERSION := $(shell git describe --tags --always)
docker-dev:
docker image build -t registry.bbr-dev.info/holiday-api/backend/dev:latest .
docker image push registry.bbr-dev.info/holiday-api/backend/dev:latest
docker-prod:
docker image build -t registry.bbr-dev.info/holiday-api/backend:$(VERSION) .
docker tag registry.bbr-dev.info/holiday-api/backend:$(VERSION) registry.bbr-dev.info/holiday-api/backend:latest
docker image push registry.bbr-dev.info/holiday-api/backend:$(VERSION)
docker image push registry.bbr-dev.info/holiday-api/backend:latest
test:
go test ./...
clean:
rm -rf holiday-api