-
Notifications
You must be signed in to change notification settings - Fork 12
/
makefile
153 lines (140 loc) · 3.43 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
ifeq ($(shell uname), Darwin) # Apple
PYTHON := python3.5
PIP := pip3.5
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else ifeq ($(CI), true) # Travis CI
PYTHON := python3.5
PIP := pip3.5
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else ifeq ($(shell uname -p), unknown) # Docker
PYTHON := python3.5
PIP := pip3.5
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else # UTCS
PYTHON := python3.5
PIP := pip3.5
PYLINT := pylint3.5
COVERAGE := coverage-3.5
PYDOC := pydoc3.4
AUTOPEP8 := autopep8
endif
clean:
cd examples; make clean
@echo
cd exercises; make clean
@echo
cd projects/collatz; make clean
config:
git config -l
docker-build:
docker build -t gpdowning/python .
docker-pull:
docker pull gpdowning/python
docker-push:
docker push gpdowning/python
docker-run:
docker run -it -v $(PWD):/usr/cs373 -w /usr/cs373 gpdowning/python
init:
touch README
git init
git add README
git commit -m 'first commit'
git remote add origin [email protected]:gpdowning/cs373.git
git push -u origin master
pull:
make clean
@echo
git pull
git status
push:
make clean
@echo
git add .travis.yml
git add Dockerfile
git add examples
git add exercises
git add makefile
git add projects/collatz
git commit -m "another commit"
git push
git status
status:
make clean
@echo
git branch
git remote -v
git status
sync:
@rsync -r -t -u -v --delete \
--include "Hello.py" \
--include "Docker.sh" \
--include "Assertions.py" \
--include "Exceptions.py" \
--exclude "*" \
../../examples/python/ examples
@rsync -r -t -u -v --delete \
--include "Hello.py" \
--include "UnitTests1.py" \
--include "UnitTests2.py" \
--include "UnitTests3.py" \
--include "Coverage1.py" \
--include "Coverage2.py" \
--include "Coverage3.py" \
--include "IsPrime1.py" \
--include "IsPrime1T.py" \
--include "IsPrime2.py" \
--include "IsPrime2T.py" \
--exclude "*" \
../../exercises/python/ exercises
@rsync -r -t -u -v --delete \
--include "Collatz.py" \
--include "RunCollatz.in" \
--include "RunCollatz.py" \
--include "RunCollatz.out" \
--include "TestCollatz.py" \
--include "TestCollatz.out" \
--exclude "*" \
../../projects/python/collatz/ projects/collatz
test:
make clean
@echo
cd examples; make test
@echo
cd exercises; make test
@echo
cd projects/collatz; make test
versions:
which make
make --version
@echo
which git
git --version
@echo
which $(PYTHON)
$(PYTHON) --version
@echo
which $(PIP)
$(PIP) --version
@echo
which $(PYLINT)
$(PYLINT) --version
@echo
which $(COVERAGE)
$(COVERAGE) --version
@echo
which $(PYDOC)
$(PYDOC) --version
@echo
which $(AUTOPEP8)
$(AUTOPEP8) --version
@echo
$(PIP) list