-
Notifications
You must be signed in to change notification settings - Fork 28
/
Makefile
46 lines (36 loc) · 1.34 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
VENDORED_ELIXIR=${PWD}/vendor/elixir/bin/elixir
VENDORED_MIX=${PWD}/vendor/elixir/bin/mix
RUN_VENDORED_MIX=${VENDORED_ELIXIR} ${VENDORED_MIX}
VERSION := $(strip $(shell cat VERSION))
STABLE_ELIXIR_VERSION = 1.0.4
.PHONY: all test
all: clean test
clean:
mix clean
test:
MIX_ENV=test mix do deps.get, clean, compile, amrita
docs:
MIX_ENV=dev mix deps.get
git checkout gh-pages && git pull --rebase && git rm -rf docs && git commit -m "remove old docs"
git checkout master
mix docs
elixir -pa ebin deps/ex_doc/bin/ex_doc "Amrita" "${VERSION}" -u "https://github.com/josephwilk/amrita"
git checkout gh-pages && git add docs && git commit -m "adding new docs" && git push origin gh-pages
git checkout master
ci: ci_${STABLE_ELIXIR_VERSION}
vendor/master:
@rm -rf vendor/*
@mkdir -p vendor/elixir
git clone --quiet https://github.com/elixir-lang/elixir.git vendor/elixir
make --quiet -C vendor/elixir > /dev/null 2>&1
ci_master: vendor/master
@${VENDORED_ELIXIR} --version
${RUN_VENDORED_MIX} local.hex --force
@MIX_ENV=test ${RUN_VENDORED_MIX} do clean, deps.get, compile, amrita
ci_$(STABLE_ELIXIR_VERSION):
@MIX_ENV=test mix do clean, deps.get, compile, amrita
test_vendored:
${RUN_VENDORED_MIX} local.hex --force
@${VENDORED_ELIXIR} --version
@${RUN_VENDORED_MIX} clean
@MIX_ENV=test ${RUN_VENDORED_MIX} do clean, deps.get, compile, amrita