holiday-api/makefile

34 lines
942 B
Makefile
Raw Normal View History

2023-06-16 07:42:50 +00:00
# scripts for building app
# requires go 1.19+ and git installed
2023-07-11 19:38:40 +00:00
VERSION := 0.1.0
2023-06-16 07:42:50 +00:00
serve:
go run ./...
setup:
go get
docker-dev:
2023-06-20 14:10:46 +00:00
docker image build -t registry.bbr-dev.info/holiday-api/backend:$(VERSION)-dev .
docker tag registry.bbr-dev.info/holiday-api/backend:$(VERSION)-dev registry.bbr-dev.info/holiday-api/backend:latest-dev
docker image push registry.bbr-dev.info/holiday-api/backend:$(VERSION)-dev
docker image push registry.bbr-dev.info/holiday-api/backend:latest-dev
2023-06-16 07:42:50 +00:00
docker-prod:
2023-06-20 14:10:46 +00:00
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
2023-06-16 07:42:50 +00:00
release:
git tag $(VERSION)
git push origin $(VERSION)
test:
go test ./...
clean:
2023-06-20 14:10:46 +00:00
rm -rf holiday-api