Skip to content

Instantly share code, notes, and snippets.

@fatih

fatih/Makefile 2

Created Mar 24, 2016
Embed
What would you like to do?
ifeq ($(strip $(shell git status --porcelain 2>/dev/null)),)
GIT_TREE_STATE=clean
else
GIT_TREE_STATE=dirty
endif
all: build
build:
@echo "==> Building the project"
release: check
@echo "==> Releasing the project"
check:
$(if $(strip $(shell git status --porcelain 2>/dev/null)),$(error git tree state is dirty),)
.PHONY: all build release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment