Last active
January 30, 2016 14:13
-
-
Save localshred/7ebd7dc2a2be35d6b595 to your computer and use it in GitHub Desktop.
Makefile useful in an Elixir project that uses watchman-make for fun and profit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHA = "HEAD" | |
WATCH_TARGET = "test" | |
ifdef sha | |
SHA = $(sha) | |
endif | |
ifdef t | |
WATCH_TARGET = $(t) | |
endif | |
all: warnings dogma test | |
compile: | |
mix compile --warnings-as-errors | |
dialyzer: compile | |
mix dialyzer | |
dogma: | |
mix dogma --format=flycheck | |
stage-release: | |
./script/release.sh stage $(SHA) | |
prod-release: | |
./script/release.sh prod $(SHA) | |
test: | |
mix test $(testargs) | |
warnings: | |
mix compile --force --warnings-as-errors | |
# See https://facebook.github.io/watchman/docs/watchman-make.html | |
watch: | |
watchman-make -p 'lib/**/*.ex' 'test/**/*.exs' 'test/data/test_cases/*.json' 'config/*.exs' -t $(WATCH_TARGET) | |
.PHONY: all compile dialyzer dogma stage-release prod-release test warnings watch | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment