-
Notifications
You must be signed in to change notification settings - Fork 20
/
Makefile
31 lines (25 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
.PHONY: help
VERSION:=$(shell grep VERSION setup.py | head -n1 | cut -d"'" -f2)
help:
@echo "Please use 'make <target>' where <target> is one of"
@echo " clean remove *.pyc files, __pycache__ and *.egg-info directories"
@echo " test execute tests"
@echo " build build the docker image"
@echo " push push the docker image"
@echo "Check the Makefile to know exactly what each target is doing."
clean:
@echo "Deleting '*.pyc', '__pycache__' and '*.egg-info'..."
find . -name '*.pyc' -delete
find . -name '__pycache__' -type d | xargs rm -fr
find . -name '*.egg-info' -type d | xargs rm -fr
rm -fr dist build
test:
docker run --name test-prometheus-data-generator --tty -v `pwd`:/tox --rm \
alexperezpujol/tox:latest tox
docker-build:
docker build -t littleangryclouds/prometheus-data-generator .
docker-push:
@docker tag littleangryclouds/prometheus-data-generator:latest littleangryclouds/prometheus-data-generator:$(VERSION)
@docker push littleangryclouds/prometheus-data-generator:latest
@docker push littleangryclouds/prometheus-data-generator:$(VERSION)
all: clean test build