-
Notifications
You must be signed in to change notification settings - Fork 430
/
build.ci.cmd
72 lines (48 loc) · 1.69 KB
/
build.ci.cmd
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
ECHO ==============================PYTHON BUILD/TEST START==============================
ECHO # Installing Requirements
CALL pip install -r .\requirements.txt
CALL pre-commit install --hook-type pre-push
pushd libraries\resource-generator
REM Dependencies
ECHO.
ECHO # Installing Resource Generator Dependencies
CALL pip install -r .\requirements.txt
REM Build Resources
ECHO.
ECHO # Building Resources
CALL python index.py ..\recognizers-choice\resource-definitions.json
CALL python index.py ..\recognizers-number\resource-definitions.json
CALL python index.py ..\recognizers-number-with-unit\resource-definitions.json
CALL python index.py ..\recognizers-date-time\resource-definitions.json
CALL python index.py ..\recognizers-sequence\resource-definitions.json
popd
pip install -e .\libraries\recognizers-text\
pip install -e .\libraries\recognizers-choice\
pip install -e .\libraries\recognizers-number\
pip install -e .\libraries\recognizers-number-with-unit\
pip install -e .\libraries\datatypes-timex-expression\
pip install -e .\libraries\recognizers-date-time\
pip install -e .\libraries\recognizers-sequence\
pip install -e .\libraries\recognizers-suite\
ECHO # Validating PEP8 style
call flake8 . --config=.\setup.cfg
pip install -r .\tests\requirements.txt
pytest --tb=line
IF %ERRORLEVEL% == 1 (
ECHO Python Test failure/s found!
EXIT /b %ERRORLEVEL%
) ELSE (
IF %ERRORLEVEL% NEQ 0 (
ECHO # Failed to build Python Project.
EXIT /b %ERRORLEVEL%
)
)
ECHO.
ECHO # Running CreateAllPackages.cmd
CALL CreateAllPackages.cmd
IF %ERRORLEVEL% NEQ 0 (
ECHO # Failed to create packages.
EXIT /b -1
)
EXIT /b 0
ECHO ============================== PYTHON BUILD/TEST END ==============================