Create a gist now

Instantly share code, notes, and snippets.

@davemo /Makefile
Last active Apr 12, 2017

What would you like to do?
makefile with helpful default targets!
VERSION ?= $(shell cat VERSION)
.PHONY: help version clean bump release
.DEFAULT_GOAL := help
build: ## build the app
do stuff
clean: ## clean artifacts
rm -rf build
release: bump ## bump the VERSION file, git tags, and push github
make push -e VERSION=$(shell cat VERSION)
version:
cat VERSION
bump:
script/bump --patch
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment