/
Makefile
59 lines (44 loc) · 1.13 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# `make` is expected to be called from the directory that contains
# this Makefile
TAG ?= latest
rebuild: clean build-dist
build-dist:
# Increase the build number
python inc-build.py thomas/core/__build__
# Build the PyPI package
python setup.py sdist bdist_wheel
publish-test:
# Uploading to test.pypi.org
twine upload --repository testpypi dist/*
publish:
# Uploading to pypi.org
twine upload --repository pypi dist/*
docker-image:
docker build \
-t thomas-core:${TAG} \
-t mellesies/thomas-core:${TAG} \
.
docker-rebuild:
docker build \
--no-cache \
-t thomas-core:${TAG} \
-t mellesies/thomas-core:${TAG} \
.
docker-run:
# Run the docker image and listen on port 9999
docker run --rm -it -p 9999:8888 --name thomas-core thomas-core:${TAG}
docker-run-browser:
# Run the docker image and listen on port 9999
docker run -d --rm -it -p 9999:8888 --name thomas-core thomas-core:${TAG}
# Open a browser
sleep 3
open http://localhost:9999/lab
docker-stop:
# Stop the docker image
docker stop thomas-core
docker-push:
docker push mellesies/thomas-core:${TAG}
clean:
# Cleaning ...
-rm -r build
-rm dist/*