-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
120 lines (98 loc) · 2.46 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package=comet
pyenv=ENV2
UNAME=$(shell uname)
export ROOT_DIR=${PWD}/cloudmesh/rest/server
MONGOD=mongod --dbpath ~/.cloudmesh/data/db --bind_ip 127.0.0.1
EVE=cd $(ROOT_DIR); $(pyenv); python service.py
VERSION=`head -1 VERSION`
define banner
@echo
@echo "###################################"
@echo $(1)
@echo "###################################"
endef
ifeq ($(UNAME),Darwin)
define terminal
osascript -e 'tell application "Terminal" to do script "$(1)"'
endef
endif
ifeq ($(UNAME),Linux)
define terminal
echo "Linux not yet supported, fix me"
endef
endif
ifeq ($(UNAME),Windows)
define terminal
echo "Windows not yet supported, fix me"
endef
endif
setup:
# brew update
# brew install mongodb
# brew install jq
rm -rf ~/.cloudmesh/data/db
mkdir -p ~/.cloudmesh/data/db
kill:
killall mongod
source:
pip install -e .
cms help
doc:
cd docs; make html
view:
open docs/build/html/index.html
publish:
ghp-import -n -p docs/build/html
clean:
rm -rf *.zip
rm -rf *.egg-info
rm -rf *.eggs
rm -rf docs/build
rm -rf build
rm -rf dist
find . -type d -name __pycache__ -delete
find . -name '*.pyc' -delete
find . -name '*.pye' -delete
rm -rf .tox
rm -f *.whl
find . -name '*~' -delete
install:
cd ../common; pip install .
cd ../cmd5; pip install .
pip install .
######################################################################
# PYPI - Only to be exectued by Gregor
######################################################################
twine:
pip install twine
dist: twine clean
@echo "######################################"
@echo "# $(VERSION)"
@echo "######################################"
# python setup.py sdist --formats=gztar,zip
# python setup.py bdist
python setup.py bdist_wheel
upload_test:
python setup.py sdist bdist bdist_wheel upload -r https://testpypi.python.org/pypi
log:
gitchangelog | fgrep -v ":dev:" | fgrep -v ":new:" > ChangeLog
git commit -m "chg: dev: Update ChangeLog" ChangeLog
git push
register: dist
@echo "######################################"
@echo "# $(VERSION)"
@echo "######################################"
twine register dist/cloudmesh.$(package)-$(VERSION)-py2.py3-none-any.whl
# twine register dist/cloudmesh.$(package)-$(VERSION).macosx-10.12-x86_64.tar.gz
# twine register dist/cloudmesh.$(package)-$(VERSION).tar.gz
# twine register dist/cloudmesh.$(package)-$(VERSION).zip
upload: dist
twine upload dist/*
#
# GIT
#
tag:
touch README.rst
git tag $(VERSION)
git commit -a -m "$(VERSION)"
git push