Skip to content

Commit

Permalink
Compress binaries (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Jan 29, 2018
1 parent b56ed61 commit 448d45b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hack/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,15 @@ def gen():

def build_cmd(name):
cfg = libbuild.BIN_MATRIX[name]
entrypoint = 'cmd/{}/*.go'.format(name)
compress = libbuild.ENV in ['prod']
if cfg['type'] == 'go':
if 'distro' in cfg:
for goos, archs in cfg['distro'].items():
for goarch in archs:
libbuild.go_build(name, goos, goarch, main='cmd/{}/*.go'.format(name))
libbuild.go_build(name, goos, goarch, entrypoint, compress)
else:
libbuild.go_build(name, libbuild.GOHOSTOS, libbuild.GOHOSTARCH, main='cmd/{}/*.go'.format(name))
libbuild.go_build(name, libbuild.GOHOSTOS, libbuild.GOHOSTARCH, entrypoint, compress)


def build_cmds():
Expand Down

0 comments on commit 448d45b

Please sign in to comment.