-
Notifications
You must be signed in to change notification settings - Fork 1
/
make.bat
executable file
·74 lines (61 loc) · 1.31 KB
/
make.bat
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
@echo off
SET PY=python -m
SET PY_FILES=importit tests setup.py
IF /I "%1"=="init-pip" GOTO init-pip
IF /I "%1"=="init" GOTO init
IF /I "%1"=="format" GOTO format
IF /I "%1"=="lint" GOTO lint
IF /I "%1"=="test" GOTO test
IF /I "%1"=="test-cov" GOTO test-cov
IF /I "%1"=="make" GOTO make
IF /I "%1"=="init-publish" GOTO init-publish
IF /I "%1"=="publish" GOTO publish
IF /I "%1"=="readme" GOTO readme
GOTO error
:init-pip
%PY% pip install -U wheel pip setuptools
GOTO :EOF
:init
CALL make.bat init-pip
%PY% pip install -e .[dev]
GOTO :EOF
:format
%PY% isort %PY_FILES%
%PY% brunette %PY_FILES%
GOTO :EOF
:lint
CALL make.bat format
%PY% flake8 %PY_FILES%
GOTO :EOF
:test
CALL make.bat lint
%PY% pytest
GOTO :EOF
:test-cov
CALL make.bat lint
%PY% pytest --cov=importit
GOTO :EOF
:make
%PY% make_to_batch
GOTO :EOF
:init-publish
CALL make.bat init-pip
%PY% pip install .[publish]
GOTO :EOF
:publish
CALL make.bat init-publish
python setup.py sdist
python setup.py bdist_wheel
%PY% twine check dist/*
%PY% twine upload --non-interactive --skip-existing dist/*
GOTO :EOF
:readme
%PY% grip --pass %pass%
GOTO :EOF
:error
IF "%1"=="" (
ECHO make: *** No targets specified and no makefile found. Stop.
) ELSE (
ECHO make: *** No rule to make target '%1%'. Stop.
)
GOTO :EOF