Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Add build helpers to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jpignata committed Dec 28, 2017
1 parent 0d6d7c1 commit bff8e38
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
bin
fargate
dist
24 changes: 23 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,29 @@
.PHONY: test
.PHONY: test build dist

test:
go test ./...

build:
go get github.com/spf13/cobra
go get github.com/aws/aws-sdk-go/aws
go get github.com/mgutz/ansi
go get github.com/hashicorp/golang-lru
go get golang.org/x/time/rate
go get golang.org/x/crypto/ssh/terminal

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

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

find dist/build -name *.zip -exec mv {} dist \;

rm -rf dist/build

0 comments on commit bff8e38

Please sign in to comment.