-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
129 lines (108 loc) · 3.72 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
121
122
123
124
125
126
127
128
129
.PHONY: clean-testing
clean-testing:
rm -Rf ~/.apkg@* && rm -Rf .agda
# python -m unittest tests/basic.py
.PHONY : clean
clean:
- rm -Rf agda_pkg.egg-info
# Silly testing
.PHONY : test
test:
@echo "T.help ++++++++++++++++++++++++++++++++++++++++++++++++++++"
@apkg --help \
&& echo "T.version +++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg --version \
&& echo "T.- ++++++++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg \
&& echo "T.clean +++++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg clean --yes \
&& echo "T.init ++++++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg init \
&& echo "T.list ++++++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg list \
&& echo "T.list --field name +++++++++++++++++++++++++++++++++++++++" \
&& apkg list --field name \
&& echo "T.list --field url ++++++++++++++++++++++++++++++++++++++++" \
&& apkg list --field url \
&& echo "T.list --field version ++++++++++++++++++++++++++++++++++++" \
&& apkg list --field version \
&& echo "T.upgrade +++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg upgrade \
&& echo "T.freeze (nothing)+++++++++++++++++++++++++++++++++++++++++" \
&& apkg freeze \
&& echo "T.search +++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg search standard \
&& echo "T.install ++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg install standard-library --version v1.1 --yes \
&& echo "T.freeze +++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg freeze
.PHONY : test-install-github
test-install-github:
@echo "++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg clean \
&& apkg init \
&& apkg install --github jonaprieto/agda-prop \
&& apkg install --github agda/agda-stdlib --version v0.16 \
&& apkg install --git http://github.com/jonaprieto/agda-metis.git
&& apkg freeze
.PHONY : test-local
test-local:
@echo "++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg clean \
&& apkg init \
&& rm -Rf /tmp/agda-stdlib \
&& cd /tmp/ && git clone http://github.com/agda/agda-stdlib \
&& rm -Rf /tmp/agda-prop \
&& cd /tmp/ && git clone http://github.com/jonaprieto/agda-prop \
&& rm -Rf /tmp/agda-metis \
&& cd /tmp/ && git clone http://github.com/jonaprieto/agda-metis \
&& echo "++++++++++++++++++++++++++++++++++++++++++++++++" \
&& cd /tmp/agda-stdlib && apkg install --no-dependencies \
&& cd /tmp/agda-prop && apkg install --no-dependencies \
&& cd /tmp/agda-metis && apkg install --no-dependencies \
&& cd /tmp/agda-metis && make test
&& apkg freeze
.PHONY : test-local-with-dependencies
test-local-with-dependencies:
@echo "++++++++++++++++++++++++++++++++++++++++++++++++" \
&& apkg clean \
&& apkg init \
&& rm -Rf /tmp/agda-metis \
&& cd /tmp/ && git clone http://github.com/jonaprieto/agda-metis \
&& echo "++++++++++++++++++++++++++++++++++++++++++++++++" \
&& cd /tmp/agda-metis && apkg install \
&& cd /tmp/agda-metis && make test \
&& apkg freeze
.PHONY : all-tests
all-tests:
make test
&& make test-local
&& make test-local-with-dependencies
&& make test-install-github
.PHONY : TODO
TODO :
@find agda-pkg -type d \( -path './.git' -o -path './dist' -o -path './build' -o -path './venv' \) -prune -o -print \
| xargs grep -I 'TODO' \
| sort
.PHONY: pip-package
pip-package:
rm -Rf dist
rm -Rf build
python3 setup.py build
python3 setup.py sdist
python3 setup.py bdist_wheel --universal
twine upload dist/*
# pip install twine
# $(eval VERSION := $(shell bash -c 'read -p "Version: " pwd; echo $$pwd'))
.PHONY : deploy
deploy :
@python3 deploy.py
.PHONY: push
push:
make pip-package
git push origin master --tags
.PHONY : downloads
downloads:
pypinfo agda-pkg country
pypinfo agda-pkg version
pypinfo agda-pkg