-
Notifications
You must be signed in to change notification settings - Fork 21
/
package-native-zip.bat
executable file
·88 lines (71 loc) · 2.45 KB
/
package-native-zip.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
echo off
SETLOCAL
set PACKAGE_VERSION_NUMBER=%1
if [%PACKAGE_VERSION_NUMBER%] == [] (
echo "ERROR: Package version number must be specified"
goto EndWithError
)
del /q dist\*
set PACKAGE_OS_NAME=Win32
set PACKAGE_NAME=conductr-cli-%PACKAGE_VERSION_NUMBER%-%PACKAGE_OS_NAME%.zip
echo.
echo Building %PACKAGE_NAME%
echo.
echo ------------------------------------------------
echo Creating single executable for 'conduct' command
echo ------------------------------------------------
echo.
pyinstaller conduct.spec
echo ------------------------------------------------
echo Creating single executable for 'shazar' command
echo ------------------------------------------------
echo.
pyinstaller shazar.spec
echo ------------------------------------------------
echo Creating single executable for 'bndl' command
echo ------------------------------------------------
echo.
pyinstaller bndl.spec
echo ------------------------------------------------
echo Validating version for 'conduct' command
echo ------------------------------------------------
echo.
del c:\temp\conduct-version.txt
conduct version > c:\temp\conduct-version.txt
set /p CONDUCT_VERSION=< c:\temp\conduct-version.txt
if %CONDUCT_VERSION% NEQ %PACKAGE_VERSION_NUMBER% (
echo ERROR: Mismatched version number for 'conduct' command
echo ERROR: 'conduct' command version: %CONDUCT_VERSION%
echo ERROR: Package version: %PACKAGE_VERSION_NUMBER%
goto EndWithError
)
echo ------------------------------------------------
echo Checking 'conduct' command is working as expected
echo ------------------------------------------------
echo.
conduct info
echo ------------------------------------------------
echo Checking 'shazar' command is working as expected
echo ------------------------------------------------
echo.
shazar -h
echo ------------------------------------------------
echo Checking 'bndl' command is working as expected
echo ------------------------------------------------
echo.
bndl -h
echo ------------------------------------------------
echo Building zip archive for %PACKAGE_NAME%
echo ------------------------------------------------
echo.
cd dist
7z a %PACKAGE_NAME% conduct.exe shazar.exe bndl.exe
cd ..
echo ------------------------------------------------
echo Success
echo ------------------------------------------------
echo Created archive in dist/%PACKAGE_NAME%
echo.
echo.
:EndWithError
echo.