Просмотр исходного кода

Remove rebar3 from repo, run dialyzer through rebar3

Alexander Petrovsky 9 лет назад
Родитель
Сommit
101044fc62
3 измененных файлов с 13 добавлено и 22 удалено
  1. 12 22
      Makefile
  2. 1 0
      rebar.lock
  3. BIN
      rebar3

+ 12 - 22
Makefile

@@ -1,7 +1,6 @@
 .PHONY: all compile run test doc clean
-.PHONY: build_plt add_to_plt dialyzer
 
-REBAR=./rebar3
+REBAR=$(shell which rebar3 || echo ./rebar3)
 
 DIALYZER_APPS = asn1 compiler crypto erts inets kernel public_key sasl ssl stdlib syntax_tools tools
 
@@ -20,26 +19,17 @@ doc:
 		$(REBAR) as dev edoc
 
 clean:
-		$(REBAR) clean
+		$(REBAR) as dev clean
 		rm -rf ./erl_crash.dump
 
-build_plt: clean compile
-ifneq ("$(wildcard erlang.plt)","")
-		@echo "Erlang plt file already exists"
-else
-		dialyzer --build_plt --output_plt erlang.plt --apps $(DIALYZER_APPS)
-endif
-ifneq ("$(wildcard pooler.plt)","")
-		@echo "pooler plt file already exists"
-else
-		dialyzer --build_plt --output_plt pooler.plt _build/default/lib/*/ebin/
-endif
-
-add_to_plt: build_plt
-		dialyzer --add_to_plt --plt erlang.plt --output_plt erlang.plt.new --apps $(DIALYZER_APPS)
-		dialyzer --add_to_plt --plt pooler.plt --output_plt pooler.plt.new _build/default/lib/*/ebin/
-		mv erlang.plt.new erlang.plt
-		mv pooler.plt.new pooler.plt
-
 dialyzer:
-		dialyzer --src src -r src --plts erlang.plt pooler.plt -Wno_return -Werror_handling -Wrace_conditions -Wunderspecs | fgrep -v -f ./dialyzer.ignore-warnings
+		$(REBAR) as dev dialyzer
+
+# Get rebar if it doesn't exist
+
+REBAR_URL=https://s3.amazonaws.com/rebar3/rebar3
+
+./rebar3:
+		erl -noinput -noshell -s inets -s ssl  -eval '{ok, _} = httpc:request(get, {"${REBAR_URL}", []}, [], [{stream, "${REBAR}"}])' -s init stop
+		chmod +x ${REBAR}
+

+ 1 - 0
rebar.lock

@@ -0,0 +1 @@
+[].