forked from skupperproject/skupper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (28 loc) · 1.38 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
31
32
33
34
35
36
37
38
39
40
41
42
VERSION := $(shell git describe --tags --dirty=-modified)
IMAGE := quay.io/skupper/controller-golang
all: build-cmd build-controller
build-cmd:
go build -ldflags="-X main.version=${VERSION}" -o skupper cmd/skupper/skupper.go
build-controller:
go build -ldflags="-X main.version=${VERSION}" -o controller cmd/skupper-controller/main.go cmd/skupper-controller/controller.go cmd/skupper-controller/service_sync.go
docker-build:
docker build -t ${IMAGE} .
docker-push:
docker push ${IMAGE}
clean:
rm -rf skupper release
deps:
dep ensure
package: release/windows.zip release/darwin.zip release/linux.tgz
release/linux.tgz: release/linux/skupper
tar -czf release/linux.tgz -C release/linux/ skupper
release/linux/skupper: cmd/skupper/skupper.go
GOOS=linux GOARCH=amd64 go build -ldflags="-X main.version=${VERSION}" -o release/linux/skupper cmd/skupper/skupper.go
release/windows/skupper: cmd/skupper/skupper.go
GOOS=windows GOARCH=amd64 go build -ldflags="-X main.version=${VERSION}" -o release/windows/skupper cmd/skupper/skupper.go
release/windows.zip: release/windows/skupper
zip -j release/windows.zip release/windows/skupper
release/darwin/skupper: cmd/skupper/skupper.go
GOOS=darwin GOARCH=amd64 go build -ldflags="-X main.version=${VERSION}" -o release/darwin/skupper cmd/skupper/skupper.go
release/darwin.zip: release/darwin/skupper
zip -j release/darwin.zip release/darwin/skupper