-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
87 lines (76 loc) · 2.07 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
package=pi
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
echo "Linux not yet supported, fix me"
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
clean:
rm -rf *.zip
rm -rf *.egg-info
rm -rf *.eggs
rm -rf docs/build
rm -rf build
rm -rf dist
find . -name '__pycache__' -delete
find . -name '*.pyc' -delete
rm -rf .tox
rm -f *.whl
######################################################################
# PYPI
######################################################################
dist: 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 upload dist/*
# twine register dist/cloudmesh.$(package)-$(VERSION)-py2.py3-none-any.whl
# twine register dist/cloudmesh.$(package)-$(VERSION).tar.gz
# twine register dist/cloudmesh.$(package)-$(VERSION).zip
upload: dist
# twine upload dist/*
twine upload dist/cloudmesh.$(package)-$(VERSION)-py2.py3-none-any.whl
# twine upload dist/cloudmesh.$(package)-$(VERSION).tar.gz
# twine upload dist/cloudmesh.$(package)-$(VERSION).zip
#
# GIT
#
tag:
touch README.rst
git tag $(VERSION)
git commit -a -m "$(VERSION)"
git push