-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (26 loc) · 613 Bytes
/
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
31
32
33
34
35
36
DOCKER_REPO=daruzero
DOCKER_IMG=cfautoupdater-go
DOCKER_TAG=$(subst /,-,$(shell git rev-parse --abbrev-ref HEAD))
docker_image=$(DOCKER_REPO)/$(DOCKER_IMG):$(DOCKER_TAG)
TEST_FLAGS=
DIRS= ./...
TAG_INC=patch
.PHONY: all
go-deps: go-tidy go-vendor
go-tidy:
@go mod tidy
go-vendor:
@go mod vendor
go-test:
@go test $(TEST_FLAGS) $(DIRS)
go-fmt:
@go fmt $(DIRS)
@fieldalignment -fix $(DIRS)
docker: docker-build docker-push
docker-build:
docker buildx build -t $(docker_image) -f build/package/Dockerfile .
docker-push:
docker push $(docker_image)
tag:
@./scripts/tag.sh $(TAG_INC)
git push --tags