Skip to content

Instantly share code, notes, and snippets.

@simeji
Created January 4, 2017 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simeji/d75dc1ff58c03337cd7610c3144e41dc to your computer and use it in GitHub Desktop.
Save simeji/d75dc1ff58c03337cd7610c3144e41dc to your computer and use it in GitHub Desktop.
jid build with docker
#!/bin/bash
bdir=`pwd`
find $bdir/cmd/jid/jid_* | grep -v .go | xargs -I{} -L1 -P4 rm -f {}
docker run --rm -v $bdir:/go -w /go tcnksm/gox:latest sh -c "go get -d ./... && cd cmd/jid && gox -ldflags '-w -s'"
cd $bdir/cmd/jid
find jid_* | grep -v .go |xargs -I@ -L1 -P4 zip @{.zip,}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment