-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (22 loc) · 883 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
#!/usr/bin/make -f
export CGO_ENABLED=0
PROJECT=github.com/codedropau/efs-provisioner
# Builds the project
build:
gox -os='linux darwin' -arch='amd64' -output='bin/efs-provisioner_{{.OS}}_{{.Arch}}' -ldflags='-extldflags "-static"' $(PROJECT)/cmd/efs-provisioner
gox -os='linux darwin' -arch='amd64' -output='bin/mount-reaper_{{.OS}}_{{.Arch}}' -ldflags='-extldflags "-static"' $(PROJECT)/cmd/mount-reaper
# Run all lint checking with exit codes for CI
lint:
golint -set_exit_status `go list ./... | grep -v /vendor/`
# Run tests with coverage reporting
test:
go test -cover ./...
IMAGE=codedropau/efs-provisioner
VERSION=$(shell git describe --tags --always)
# Releases the project Docker Hub
release:
docker build -t ${IMAGE}:${VERSION} .
docker build -t ${IMAGE}:latest .
docker push ${IMAGE}:${VERSION}
docker push ${IMAGE}:latest
.PHONY: build lint test release