mirror of
https://github.com/valitydev/kds.git
synced 2024-11-06 08:15:19 +00:00
2f62c8b8e6
* Update images * Upgrade jose * +bump images * +otp 23 support * +build utils * bump images * +drop loading libdecaf * Remove recon Co-authored-by: dinama <dinama@users.noreply.github.com>
73 lines
1.4 KiB
Makefile
73 lines
1.4 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 := kds
|
|
# 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 := b2c2a3f8c46842488eef78a2574ba880eeff07b9
|
|
|
|
# Build image tag to be used
|
|
BUILD_IMAGE_NAME := build-erlang
|
|
BUILD_IMAGE_TAG := 77025543100d92756b4d47f68538e8e70cafc7ef
|
|
|
|
CALL_W_CONTAINER := all submodules compile xref lint dialyze test \
|
|
release clean distclean check_format format
|
|
|
|
.PHONY: $(CALL_W_CONTAINER)
|
|
|
|
all: compile
|
|
|
|
-include $(UTILS_PATH)/make_lib/utils_container.mk
|
|
-include $(UTILS_PATH)/make_lib/utils_image.mk
|
|
|
|
$(SUBTARGETS): %/.git: %
|
|
git submodule update --init $<
|
|
touch $@
|
|
|
|
submodules: $(SUBTARGETS)
|
|
|
|
compile: submodules
|
|
$(REBAR) compile
|
|
|
|
xref: submodules
|
|
$(REBAR) xref
|
|
|
|
lint:
|
|
elvis rock
|
|
|
|
check_format:
|
|
$(REBAR) fmt -c
|
|
|
|
format:
|
|
$(REBAR) fmt -w
|
|
|
|
dialyze: submodules
|
|
$(REBAR) dialyzer
|
|
|
|
devrel: submodules
|
|
$(REBAR) release
|
|
|
|
release: submodules distclean
|
|
$(REBAR) as prod release
|
|
|
|
clean:
|
|
$(REBAR) clean
|
|
|
|
distclean:
|
|
$(REBAR) clean -a
|
|
rm -rf _build
|
|
|
|
test: submodules
|
|
$(REBAR) do eunit,ct
|
|
|