Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #77 from soundcloud/feature/bin-dist

Cross-compilation via 'dist' target
  • Loading branch information...
commit b36d390decf1b544c901b60143b021094fbb8cef 2 parents 6059d63 + 26f65f4
@cloudhead cloudhead authored
Showing with 9 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +8 −0 Makefile
View
1  .gitignore
@@ -6,3 +6,4 @@ src/
tags
visor.rb-e
visor
+bin/
View
8 Makefile
@@ -4,6 +4,7 @@ GOBIN ?= $(GOPATH)/bin
LDFLAGS := -ldflags "-X main.VERSION $(VERSION)"
GOFLAGS := -x $(LDFLAGS)
PKGPATH := $(GOPATH)/src/github.com/soundcloud/visor
+GOARCH ?= amd64
# LOCAL #
@@ -23,6 +24,13 @@ $(PKGPATH):
test:
go test
+# DIST #
+
+dist: linux darwin
+
+linux darwin:
+ GOOS=$@ CGO_ENABLED=0 GOARCH=$(GOARCH) go build $(LDFLAGS) -o bin/$@/visor ./cmd/visor
+
# DEBIAN PACKAGING #
DEB_NAME=visor
Please sign in to comment.
Something went wrong with that request. Please try again.