Skip to content

Instantly share code, notes, and snippets.

@davemo
Last active April 12, 2017 21:04
Show Gist options
  • Save davemo/c0462e8196289e0fb0210ee63ff02962 to your computer and use it in GitHub Desktop.
Save davemo/c0462e8196289e0fb0210ee63ff02962 to your computer and use it in GitHub Desktop.
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