hellgate/Makefile
Andrew Mayorov 0791b44eee
HG-314: Introduce digital wallets (#164)
* HG-314: Let it learn new payment tool and storage schema

* HG-314: Add forgotten payment tool condition assertions

* HG-314: Increase healthcheck timeouts just for the fun of it

* HG-326: Introduce new rounding rule for cashflow volume (#169)

* BA-52: Bump to master rbkmoney/damsel@620cca5

* BA-52: Bump to master rbkmoney/dominant@68d75c0
2018-01-24 16:40:54 +03:00

77 lines
1.5 KiB
Makefile

REBAR := $(shell which rebar3 2>/dev/null || which ./rebar3)
SUBMODULES = build_utils
SUBTARGETS = $(patsubst %,%/.git,$(SUBMODULES))
UTILS_PATH := build_utils
TEMPLATES_PATH := .
# Name of the service
SERVICE_NAME := hellgate
# Service image default tag
SERVICE_IMAGE_TAG ?= $(shell git rev-parse HEAD)
# The tag for service image to be pushed with
SERVICE_IMAGE_PUSH_TAG ?= $(SERVICE_IMAGE_TAG)
# Base image for the service
BASE_IMAGE_NAME := service_erlang
BASE_IMAGE_TAG := 16e2b3ef17e5fdefac8554ced9c2c74e5c6e9e11
# Build image tag to be used
BUILD_IMAGE_TAG := 4fa802d2f534208b9dc2ae203e2a5f07affbf385
CALL_ANYWHERE := all submodules rebar-update compile xref lint dialyze start devrel release clean distclean
CALL_W_CONTAINER := $(CALL_ANYWHERE) test
all: compile
-include $(UTILS_PATH)/make_lib/utils_container.mk
-include $(UTILS_PATH)/make_lib/utils_image.mk
.PHONY: $(CALL_W_CONTAINER)
# CALL_ANYWHERE
$(SUBTARGETS): %/.git: %
git submodule update --init $<
touch $@
submodules: $(SUBTARGETS)
rebar-update:
$(REBAR) update
compile: submodules rebar-update
$(REBAR) compile
xref: submodules
$(REBAR) xref
lint:
elvis rock
dialyze: submodules
$(REBAR) dialyzer
start: submodules
$(REBAR) run
devrel: submodules
$(REBAR) release
release: submodules
$(REBAR) as prod release
clean:
$(REBAR) clean
distclean:
$(REBAR) clean -a
rm -rf _build
# CALL_W_CONTAINER
test: submodules
$(REBAR) ct
test.%: apps/hellgate/test/hg_%_tests_SUITE.erl
$(REBAR) ct --suite=$^