forked from awslabs/fargatecli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 1.4 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
.PHONY: mocks test build dist
PACKAGES := $(shell go list ./... | grep -v /mock)
mocks:
go get github.com/golang/mock/mockgen
go generate $(PACKAGES)
test:
go test -race -cover $(PACKAGES)
build:
go build -o bin/fargate main.go
dist:
GOOS=darwin GOARCH=amd64 go build -o dist/build/fargate-darwin-amd64/fargate main.go
GOOS=linux GOARCH=amd64 go build -o dist/build/fargate-linux-amd64/fargate main.go
GOOS=linux GOARCH=386 go build -o dist/build/fargate-linux-386/fargate main.go
GOOS=linux GOARCH=arm go build -o dist/build/fargate-linux-arm/fargate main.go
GOOS=windows go get -u github.com/spf13/cobra
GOOS=windows GOARCH=amd64 go build -o dist/build/fargate-windows-amd64/fargate.exe main.go
GOOS=windows GOARCH=386 go build -o dist/build/fargate-windows-386/fargate.exe main.go
cd dist/build/fargate-darwin-amd64 && zip fargate-${FARGATE_VERSION}-darwin-amd64.zip fargate
cd dist/build/fargate-linux-amd64 && zip fargate-${FARGATE_VERSION}-linux-amd64.zip fargate
cd dist/build/fargate-linux-386 && zip fargate-${FARGATE_VERSION}-linux-386.zip fargate
cd dist/build/fargate-linux-arm && zip fargate-${FARGATE_VERSION}-linux-arm.zip fargate
cd dist/build/fargate-windows-amd64 && zip fargate-${FARGATE_VERSION}-windows-amd64.zip fargate.exe
cd dist/build/fargate-windows-386 && zip fargate-${FARGATE_VERSION}-windows-386.zip fargate.exe
find dist/build -name *.zip -exec mv {} dist \;
rm -rf dist/build