Skip to content

Commit

Permalink
Add github_package target to Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mat committed Dec 2, 2015
1 parent 86a51f0 commit a0e05f8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,32 @@ minify_css:
update_assets:
go-bindata -pkg assets -ignore assets.go -o besticon/iconserver/assets/assets.go besticon/iconserver/assets/

#
## Building ##
#

clean:
rm -rf bin/*

build_darwin_amd64:
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -o bin/darwin_amd64/iconserver github.com/mat/besticon/besticon/iconserver

build_linux_amd64:
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -o bin/linux_amd64/iconserver github.com/mat/besticon/besticon/iconserver

build_windows_amd64:
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -a -installsuffix cgo -o bin/windows_amd64/iconserver.exe github.com/mat/besticon/besticon/iconserver

build_all_platforms: build_darwin_amd64 build_linux_amd64 build_windows_amd64
find bin/ -type file | xargs file

github_package: build_all_platforms
zip -o -j iconserver_darwin-amd64 bin/darwin_amd64/*
zip -o -j iconserver_linux_amd64 bin/linux_amd64/*
zip -o -j iconserver_windows_amd64 bin/windows_amd64/*
file iconserver*.zip
ls -alht iconserver*.zip

build_docker_image: build_linux_amd64
docker build -t matthiasluedtke/iconserver .

Expand Down

0 comments on commit a0e05f8

Please sign in to comment.