forked from AcalephStorage/rudder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (25 loc) · 680 Bytes
/
Copy pathMakefile
File metadata and controls
32 lines (25 loc) · 680 Bytes
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
APP=rudder
VERSION=latest
LDFLAGS=-ldflags "-X github.com/AcalephStorage/rudder/cmd.version=${VERSION}"
all: deps build
clean:
@echo "--> cleaning..."
@rm -rf build
@rm -rf vendor
@go clean ./...
prereq:
@mkdir -p build/{bin,tar}
@go get -u github.com/Masterminds/glide
deps: prereq
@glide install
build: prereq
@echo '--> building...'
@go fmt ./...
go build -o build/bin/${APP} ${LDFLAGS} ./cmd
package:
@echo '--> packaging...'
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -o build/bin/${APP} ${LDFLAGS} ./cmd
@docker build -t quay.io/acaleph/rudder:${VERSION} .
deploy: package
@echo '--> deploying...'
@docker push quay.io/acaleph/rudder:${VERSION}