mirror of
https://github.com/valitydev/limiter.git
synced 2024-11-06 00:55:22 +00:00
9bf3e29636
* draft * added format * added backend stuff * added requested changes except batch in range machine * added error sort in handler, add lim_body and its validation * added start time and shard size, implemented shard id generation and time range calculation * fixed xref * fixed format * added unit tests * refactored errors * updated to new proto * added config marshaling * fixed format * added base tests * added exchange tests * fixed linter * added requested changes * updated proto ref
78 lines
1.5 KiB
Makefile
78 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 := limiter
|
|
# 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 := 54a794b4875ad79f90dba0a7708190b3b37d584f
|
|
|
|
# Build image tag to be used
|
|
BUILD_IMAGE_NAME := build-erlang
|
|
BUILD_IMAGE_TAG := 491bc06c745a07c6fe9e8b5dbbe958e8e0b82c4c
|
|
|
|
CALL_ANYWHERE := all submodules rebar-update compile xref lint dialyze \
|
|
release clean distclean check format check_format
|
|
|
|
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
|
|
|
|
check_format:
|
|
$(REBAR) fmt -c
|
|
|
|
format:
|
|
$(REBAR) fmt -w
|
|
|
|
dialyze:
|
|
$(REBAR) dialyzer
|
|
|
|
check: xref lint dialyze
|
|
|
|
release: distclean
|
|
$(REBAR) as prod release
|
|
|
|
clean:
|
|
$(REBAR) clean
|
|
|
|
distclean:
|
|
$(REBAR) clean
|
|
rm -rf _build
|
|
|
|
# CALL_W_CONTAINER
|
|
test: submodules
|
|
$(REBAR) do eunit, ct
|