-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (28 loc) · 1.08 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
VERSION = $(shell jq -r .version meta.json)-$(shell TZ=UTC git --no-pager show --quiet --abbrev=12 --date='format-local:%Y%m%d%H%M%S' --format='%cd-%h')
compile:
@go build -o bin/server cmd/server/main.go
build:
@docker build --build-arg GO_OPTIONS=-trimpath --build-arg VERSION=$(VERSION) --build-arg STAGE=production . -t anime-skip/public-api/server:dev
@echo
@docker image ls | grep "anime-skip/public-api/server"
@echo
run: pre-run
VERSION=$(VERSION) docker-compose up --build --abort-on-container-exit --exit-code-from public_api
run-clean: pre-run
VERSION=$(VERSION) docker-compose up --build --abort-on-container-exit --exit-code-from public_api -V --remove-orphans
pre-run:
@touch .env
watch:
modd
gen:
go generate ./...
test: compile
LOG_LEVEL=3 ginkgo ./...
backfill-anilist-shows:
go run ./cmd/backfill-anilist-shows
validate-timestamps:
go run ./cmd/validate-timestamps
get-prod-env:
heroku config -a prod-public-api --shell | cat > .env.prod
run-prod:
VERSION=$(VERSION) docker-compose -f docker-compose.prod.yml up --build --abort-on-container-exit --exit-code-from public_api