Skip to content

Commit cf22ff9

Browse files
committed
feat: silence pip install output
1 parent de17a97 commit cf22ff9

File tree

1 file changed

+37
-17
lines changed

1 file changed

+37
-17
lines changed

entrypoint.sh

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,26 @@
5454
echo "Creating virtual environment: $2"
5555
python3 -m venv $2
5656
echo "Activating virtual environment: $2"
57+
echo ""
5758
source $2/bin/activate
58-
pip install -U pip
59+
pip install -U -q pip
60+
61+
echo "Commencing tool run"
62+
echo ""
5963

6064
# Run the autoformatters first.
6165
if [ "$3" = true ] ; then
6266

6367
echo Running: black --check ${33} $1
6468

65-
pip install black$4
69+
pip install -q black$4
6670

6771
black --check ${33} $1
6872
exit_code=$?
6973

7074
if [ "$exit_code" = "0" ]; then
7175
echo "Black ok"
76+
echo ""
7277
else
7378
echo "Black error"
7479
exit $exit_code
@@ -80,13 +85,14 @@ if [ "$5" = true ]; then
8085

8186
echo Running: yapf ${34} $1
8287

83-
pip install yapf$6
88+
pip install -q yapf$6
8489

8590
yapf ${34} $1
8691
exit_code=$?
8792

8893
if [ "$exit_code" = "0" ]; then
8994
echo "yapf ok"
95+
echo ""
9096
else
9197
echo "yapf error"
9298
exit $exit_code
@@ -98,15 +104,16 @@ if [ "$7" = true ] ; then
98104

99105
echo Running: isort ${35} $1 -c --diff
100106

101-
pip install isort$8
107+
pip install -q isort$8
102108

103109
isort ${35} $1 -c --diff
104110
exit_code=$?
105111

106112
if [ "$exit_code" = "0" ]; then
107113
echo "isort ok"
114+
echo ""
108115
else
109-
echo "isort error $exit_code"
116+
echo "isort error"
110117
exit $exit_code
111118
fi
112119

@@ -116,15 +123,17 @@ if [ "$9" = true ] ; then
116123

117124
echo Running: docformatter -c --recursive ${36} $1
118125

119-
pip install docformatter${10}
126+
pip install -q docformatter${10}
120127

121128
docformatter -c --recursive ${36} $1
122129
exit_code=$?
123130

124131
if [ "$exit_code" = "0" ]; then
125132
echo "docformatter ok"
133+
echo ""
126134
elif [ "$exit_code" = "3" ]; then
127135
echo "docformatter wants to format one or more files"
136+
echo ""
128137
else
129138
echo "docformatter error"
130139
echo $exit_code
@@ -136,13 +145,14 @@ if [ "${11}" = true ] ; then
136145

137146
echo Running: pycodestyle ${37} $1
138147

139-
pip install pycodestyle${12}
148+
pip install -q pycodestyle${12}
140149

141150
pycodestyle ${37} $1
142151
exit_code=$?
143152

144153
if [ "$exit_code" = "0" ]; then
145154
echo "pycodestyle ok"
155+
echo ""
146156
else
147157
echo "pycodestyle error"
148158
exit $exit_code
@@ -154,13 +164,14 @@ if [ "${13}" = true ] ; then
154164

155165
echo Running: autopep8 ${38} $1
156166

157-
pip install autopep8${14}
167+
pip install -q autopep8${14}
158168

159169
autopep8 ${38} $1
160170
exit_code=$?
161171

162172
if [ "$exit_code" = 0 ]; then
163173
echo "autopep8 ok"
174+
echo ""
164175
else
165176
echo "autopep8 error"
166177
echo $exit_code
@@ -172,13 +183,14 @@ if [ "${15}" = true ] ; then
172183

173184
echo Running: pydocstyle ${39} $1
174185

175-
pip install pydocstyle${16}
186+
pip install -q pydocstyle${16}
176187

177188
pydocstyle ${39} $1
178189
exit_code=$?
179190

180191
if [ "$exit_code" = 0 ]; then
181192
echo "pydocstyle ok"
193+
echo ""
182194
else
183195
echo "pydocstyle error"
184196
exit $exit_code
@@ -190,13 +202,14 @@ if [ "${17}" = true ] ; then
190202

191203
echo Running: mypy ${40} $1
192204

193-
pip install mypy${18}
205+
pip install -q mypy${18}
194206

195207
mypy ${40} $1
196208
exit_code=$?
197209

198210
if [ "$exit_code" = "0" ]; then
199211
echo "mypy ok"
212+
echo ""
200213
else
201214
echo "mypy error"
202215
exit $exit_code
@@ -209,13 +222,14 @@ if [ "${19}" = true ] ; then
209222

210223
echo Running: pylint ${41} $1
211224

212-
pip install pylint${20}
225+
pip install -q pylint${20}
213226

214227
pylint ${41} $1
215228
exit_code=$?
216229

217230
if [ "$exit_code" = "0" ]; then
218231
echo "Pylint ok"
232+
echo ""
219233
else
220234
echo "Pylint error"
221235
exit $exit_code
@@ -227,13 +241,14 @@ if [ "${21}" = true ] ; then
227241

228242
echo Running: flake8 ${42} $1
229243

230-
pip install flake8${22}
244+
pip install -q flake8${22}
231245

232246
flake8 ${42} $1
233247
exit_code=$?
234248

235249
if [ "$exit_code" = "0" ]; then
236250
echo "Flake8 ok"
251+
echo ""
237252
else
238253
echo "Flake8 error"
239254
exit $exit_code
@@ -246,13 +261,14 @@ if [ "${23}" = true ]; then
246261

247262
echo Running: mccabe ${43} $1
248263

249-
pip install mccabe${24}
264+
pip install -q mccabe${24}
250265

251266
python -m mccabe ${43} $1
252267
exit_code=$?
253268

254269
if [ "$exit_code" = "0" ]; then
255270
echo "mccabe complexity ok"
271+
echo ""
256272
else
257273
echo "mccabe error"
258274
exit $exit_code
@@ -263,13 +279,14 @@ if [ "${25}" = true ]; then
263279

264280
echo Running: radon ${44} $1
265281

266-
pip install radon${26}
282+
pip install -q radon${26}
267283

268284
radon ${44} $1
269285
exit_code=$?
270286

271287
if [ "$exit_code" = "0" ]; then
272288
echo "radon ok"
289+
echo ""
273290
else
274291
echo "radon error"
275292
exit $exit_code
@@ -281,13 +298,14 @@ if [ "${27}" = true ]; then
281298

282299
echo Running: rstcheck ${45} $1
283300

284-
pip install rstcheck${28}
301+
pip install -q rstcheck${28}
285302

286303
rstcheck ${45} $1
287304
exit_code=$?
288305

289306
if [ "$exit_code" = "0" ]; then
290307
echo "Rstcheck ok"
308+
echo ""
291309
else
292310
echo "Rstcheck error"
293311
exit $exit_code
@@ -299,13 +317,14 @@ if [ "${29}" = true ]; then
299317

300318
echo Running: check-manifest ${46} .
301319

302-
pip install check-manifest${30}
320+
pip install -q check-manifest${30}
303321

304322
check-manifest ${46} .
305323
exit_code=$?
306324

307325
if [ "$exit_code" = "0" ]; then
308326
echo "Check-manifest ok"
327+
echo ""
309328
else
310329
echo "Check-manifest error"
311330
exit $exit_code
@@ -316,13 +335,14 @@ if [ "${31}" = true ]; then
316335

317336
echo Running: pyroma ${47} .
318337

319-
pip install pyroma${32}
338+
pip install -q pyroma${32}
320339

321340
pyroma ${47} .
322341
exit_code=$?
323342

324343
if [ "$exit_code" = "0" ]; then
325344
echo "Pyroma ok"
345+
echo ""
326346
else
327347
echo "Pyroma error"
328348
exit $exit_code

0 commit comments

Comments
 (0)