damsel/build/erlang/Makefile
Pavel Popov 427459a2aa MST-106: Payouts (#188)
* MST-106: Payouts

* Add proto to erlang release

* MST-106: Fix field sequence

* MST-106: Rename payout type fields

* MST-106: Payout proto improvements (#201)

* MST-106: Add bank card data

* PayoutType -> PayoutTool (#204)

* Align fields nameing between merch_stat and domain (#214)

* SHT-89: get payout info for PAPI (#215)

* SHT-89: get payout info for PAPI
* SHT-89: removed pay2card interface
2017-09-04 18:40:55 +03:00

42 lines
653 B
Makefile

REBAR := $(shell which rebar3 2>/dev/null || which ./rebar3)
define gen
$(THRIFT) --gen erlang:scoped_typenames,app_prefix=dmsl -out src $(1)
endef
release: generate lint xref dialyze publish
generate: $(FILES)
$(patsubst %, $(call gen,%), $(FILES))
@mkdir -p include
@mv -v src/*.hrl include
lint:
elvis rock
xref:
$(REBAR) xref
dialyze:
$(REBAR) dialyzer
distclean:
@rm -rf _build
@rm -rvf src/*_thrift.erl include
DESTDIR ?= release
ARTIFACTS := \
include \
src \
elvis.config \
rebar.config \
rebar.lock
publish: $(DESTDIR) $(ARTIFACTS)
@cp -r $(ARTIFACTS) $(DESTDIR)
@cp -r $(PROTO) $(DESTDIR)/
$(DESTDIR):
@mkdir -p $@