Skip to content

Instantly share code, notes, and snippets.

@achille-roussel
Created March 14, 2019 15:59
Show Gist options
  • Save achille-roussel/7cffd921b271b35377131d63eaff0c3f to your computer and use it in GitHub Desktop.
Save achille-roussel/7cffd921b271b35377131d63eaff0c3f to your computer and use it in GitHub Desktop.
The 99% Makefile
deps := go.mod
sources := \
$(wildcard ./cmd/demo/*.go) \
$(wildcard ./*.go)
./demo: $(deps) $(sources)
GOOS=linux go build ./cmd/demo/
./demo.tar.gz: ./demo
docker build -f Dockerfile -t demo .
docker save demo > ./demo.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment