forked from teslamate-org/teslamate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
17 lines (13 loc) · 645 Bytes
/
Makefile
File metadata and controls
17 lines (13 loc) · 645 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.PHONY: help grafana teslamate
APP_NAME ?= `grep 'app:' mix.exs | sed -e 's/\[//g' -e 's/ //g' -e 's/app://' -e 's/[:,]//g'`
APP_VSN ?= `grep 'version:' mix.exs | cut -d '"' -f2`
BUILD ?= `git rev-parse --short HEAD`
help:
@echo "$(APP_NAME):$(APP_VSN)-$(BUILD)"
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
teslamate: ## Build teslamate Docker image
@docker build \
-t $(APP_NAME):$(APP_VSN)-$(BUILD) \
-t $(APP_NAME) .
grafana: ## Build teslamate-grafana Docker image
@cd grafana && docker build -t teslamate-grafana .