34 lines
909 B
Makefile
34 lines
909 B
Makefile
|
# scripts for building app
|
||
|
# requires go 1.19+ and git installed
|
||
|
|
||
|
VERSION := 0.0.1
|
||
|
|
||
|
serve:
|
||
|
go run ./...
|
||
|
|
||
|
setup:
|
||
|
go get
|
||
|
|
||
|
docker-dev:
|
||
|
docker image build -t registry.bbr-dev.info/template/backend:$(VERSION)-dev .
|
||
|
docker tag registry.bbr-dev.info/template/backend:$(VERSION)-dev registry.bbr-dev.info/template/backend:latest-dev
|
||
|
docker image push registry.bbr-dev.info/template/backend:$(VERSION)-dev
|
||
|
docker image push registry.bbr-dev.info/template/backend:latest-dev
|
||
|
|
||
|
|
||
|
docker-prod:
|
||
|
docker image build -t registry.bbr-dev.info/template/backend:$(VERSION) .
|
||
|
docker tag registry.bbr-dev.info/template/backend:$(VERSION) registry.bbr-dev.info/template/backend:latest
|
||
|
docker image push registry.bbr-dev.info/template/backend:$(VERSION)
|
||
|
docker image push registry.bbr-dev.info/template/backend:latest
|
||
|
|
||
|
release:
|
||
|
git tag $(VERSION)
|
||
|
git push origin $(VERSION)
|
||
|
|
||
|
test:
|
||
|
go test ./...
|
||
|
|
||
|
clean:
|
||
|
rm -rf template
|