diff --git a/.gitignore b/.gitignore index 1035e6666..e93aa999b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ mmctl bin +build \ No newline at end of file diff --git a/Makefile b/Makefile index a77276419..820149ccd 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,23 @@ build: vendor check install: vendor check go install -mod=vendor +package: vendor check + mkdir -p build + + @echo Build Linux amd64 + env GOOS=linux GOARCH=amd64 go build -mod=vendor + tar cf build/linux_amd64.tar mmctl + + @echo Build OSX amd64 + env GOOS=darwin GOARCH=amd64 go build -mod=vendor + tar cf build/darwin_amd64.tar mmctl + + @echo Build Windows amd64 + env GOOS=windows GOARCH=amd64 go build -mod=vendor + zip build/windows_amd64.zip mmctl.exe + + rm mmctl mmctl.exe + fmt: go fmt $(GO_PACKAGES)