forked from 28mm/blast-radius
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
45 lines (36 loc) · 1.04 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#
# make clean
# make
# make publish
#
# TODO: add tests.
#
CATEGORIES_JSON = ./blastradius/server/static/js/categories.json
CATEGORIES_JS = ./blastradius/server/static/js/categories.js
.PHONY: clean
clean:
-find . -type d -name __pycache__ -exec rm -r {} \+
-rm $(CATEGORIES_JSON)
-rm $(CATEGORIES_JS)
# build pypi package
.PHONY: dist
dist:
-python3 setup.py sdist
# build docker image
.PHONY: docker
docker:
-docker build -t ianyliu/blast-radius-fork .
# push pypi and docker images to public repos
.PHONY: publish
publish:
-twine upload dist/*
-docker push ianyliu/blast-radius-fork:latest
# rebuild categories.js from upstream docs
.PHONY: categories
categories: $(CATEGORIES_JS)
$(CATEGORIES_JSON):
-./utilities/providers/provider-category-json.py > $(CATEGORIES_JSON).new && mv $(CATEGORIES_JSON).new $(CATEGORIES_JSON)
$(CATEGORIES_JS): $(CATEGORIES_JSON)
-sed -e '1s/{/resource_groups \= {/' $(CATEGORIES_JSON) > $(CATEGORIES_JS).new && mv $(CATEGORIES_JS).new $(CATEGORIES_JS)
# probably best to clean 1st
all: categories dist docker