-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathrun_upgrade_custom.bat
72 lines (72 loc) · 1.65 KB
/
run_upgrade_custom.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
@echo off
echo =============================
echo = KqlmagicCustom package =
echo =============================
REM
REM clean folders used by setuptools and wheel
echo ----- clean folders to be used by setuptools and wheel
rmdir /Q /S build
rmdir /Q /S dist
REM
REM valid values are: for Kqlmagic False, and for KqlmagicCustom True
echo ----- modify setup.py: _IS_CUSTOM_SETUP = True
python modify_setup_py_is_custom.py True
if errorlevel 1 (
echo ----- Failed to modify setup.py -----
PAUSE
exit /b 1
)
REM
echo ----- create sdist bdist_wheel
python setup.py sdist bdist_wheel
if errorlevel 1 (
echo ----- Failed to to create wheel -----
PAUSE
exit /b 1
)
REM
echo ----- REVIEW KqlmagicCustom SETUP PARAMETERS
PAUSE
REM review what is included in dist
REM check dist is OK
echo ----- check create dist is OK
twine check dist/*
if errorlevel 1 (
echo ----- invalid dist, twine check failed -----
PAUSE
exit /b 1
)
REM
if not defined PYPI_USERNAME (
echo ----- environment variable PYPI_USERNAME is not defined -----
PAUSE
exit /b 1
)
REM
if not defined PYPI_PASSWORD (
echo ----- environment variable PYPI_PASSWORD is not defined -----
PAUSE
exit /b 1
)
REM
REM upload package to PYPI
echo ----- upload dist to PYPI
twine upload -u %PYPI_USERNAME% -p %PYPI_PASSWORD% dist/*
if errorlevel 1 (
echo ----- failed to uplad dist -----
PAUSE
exit /b 1
)
REM
REM cleanup
echo ----- cleanup folders used by setuptools and wheel
rmdir /Q /S build
rmdir /Q /S dist
REM
REM
REM
REM
REM
REM reminder to upgrade the dependencies in binder/requirements.txt
echo ----- UPDATE version in binder/requirements.txt -----
PAUSE