-
Notifications
You must be signed in to change notification settings - Fork 0
/
CreateInstallerOSX.bat
88 lines (69 loc) · 2.21 KB
/
CreateInstallerOSX.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
set "target=osx-x64"
set "publishDir=%~dp0\.publish"
set "electronDir=%~dp0\SQLSchemaCompare"
set "remoteIp=10.0.10.205"
set "remoteUser=neolution"
set "remotePass=Neo-1234."
set "remoteDir=/private/tmp/sqlschemacompare-build"
call CreateInstallerCommon.bat %target%
if ERRORLEVEL 1 goto:error
echo.
echo _____________________
echo /\ \
echo \_^| Preparing ^|
echo ^| OSX ^|
echo ^| _________________^|_
echo \_/___________________/
echo.
REM Cleanup folders
plink -pw %remotePass% %remoteUser%@%remoteIp% (^
rm -rf %remoteDir%;^
mkdir %remoteDir%;^
)
if ERRORLEVEL 1 goto:error
REM Copy files to OSX
pscp -pw %remotePass% -r %publishDir% %remoteUser%@%remoteIp%:%remoteDir%
pscp -pw %remotePass% -r %electronDir% %remoteUser%@%remoteIp%:%remoteDir%
if ERRORLEVEL 1 goto:error
echo.
echo _____________________
echo /\ \
echo \_^| Packaging ^|
echo ^| electron ^|
echo ^| OSX ^|
echo ^| _________________^|_
echo \_/___________________/
echo.
REM Create installer
plink -pw %remotePass% %remoteUser%@%remoteIp% (^
export PATH=/usr/local/bin:$PATH;^
cd %remoteDir%/SQLSchemaCompare;^
chmod -R a+rwx ./node_modules;^
chmod +x ../.publish/TiCodeX.SQLSchemaCompare.UI;^
yarn dist-%target%;^
)
if ERRORLEVEL 1 goto:error
REM Copy generated files to local
mkdir %~dp0\installer
pscp -pw %remotePass% %remoteUser%@%remoteIp%:%remoteDir%/installer/*.zip %~dp0\installer\
pscp -pw %remotePass% %remoteUser%@%remoteIp%:%remoteDir%/installer/*.dmg %~dp0\installer\
pscp -pw %remotePass% %remoteUser%@%remoteIp%:%remoteDir%/installer/*.blockmap %~dp0\installer\
pscp -pw %remotePass% %remoteUser%@%remoteIp%:%remoteDir%/installer/*.yml %~dp0\installer\
if ERRORLEVEL 1 goto:error
REM Cleanup folders
plink -pw %remotePass% %remoteUser%@%remoteIp% rm -rf %remoteDir%
if exist %publishDir% ( rmdir /S /Q %publishDir% )
if ERRORLEVEL 1 goto:error
echo.
echo.
echo DONE.
REM processes done correctly
goto:exit
:error
echo.
echo.
echo FAILED.
:exit
echo Press any key to close...
pause > nul