-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCreateInstallerLinux.bat
70 lines (54 loc) · 1.61 KB
/
CreateInstallerLinux.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
@echo off
set "target=linux-x64"
set "publishDir=%~dp0\.publish"
call CreateInstallerCommon.bat %target%
if ERRORLEVEL 1 goto:error
echo.
echo _____________________
echo /\ \
echo \_^| Packaging ^|
echo ^| electron ^|
echo ^| DOCKER ^|
echo ^| _________________^|_
echo \_/___________________/
echo.
REM Cleanup folders
if exist %~dp0\installer\linux-unpacked ( rmdir /S /Q %~dp0\installer\linux-unpacked )
REM Create a volume for caching
docker volume create electron-cache
docker run --rm^
-v electron-cache:/root/.cache^
-v %~dp0:/project^
-w /project/SQLSchemaCompare^
--env ELECTRON_CACHE="/root/.cache/electron"^
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder"^
electronuserland/builder^
yarn dist-%target%
if ERRORLEVEL 1 goto:error
REM Cleanup folders
if exist %publishDir% ( rmdir /S /Q %publishDir% )
if exist %~dp0\installer\linux-unpacked ( rmdir /S /Q %~dp0\installer\linux-unpacked )
if ERRORLEVEL 1 goto:error
REM Create latest-linux.yml
for /f "tokens=1,2" %%a in (%~dp0\SQLSchemaCompare\package.json) do (
if %%a=="version": (
set version=%%b
goto:versionfound
)
)
:versionfound
echo version: %version:~1,-2%> %~dp0\installer\latest-linux.yml
echo path: SQLSchemaCompare-%version:~1,-2%.xxx>> %~dp0\installer\latest-linux.yml
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