forked from mitre/saf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pack-hdf-converters.bat
56 lines (41 loc) · 1.41 KB
/
pack-hdf-converters.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
ECHO OFF
SET CYPRESS_INSTALL_BINARY=0
SET PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
SET original_dir=%cd%
ECHO %original_dir%
IF DEFINED npm_config_heimdall (
CD %npm_config_heimdall%/libs/hdf-converters/
) ELSE (
CD ../heimdall2/libs/hdf-converters/
)
IF DEFINED npm_config_branch (
CALL git switch %npm_config_branch% || EXIT /B %ERRORLEVEL%
) ELSE (
CALL git switch master || EXIT /B %ERRORLEVEL%
)
ECHO Executing - git fetch ...
CALL git fetch || EXIT /B %ERRORLEVEL%
ECHO Executing - git pull ...
CALL git pull || EXIT /B %ERRORLEVEL%
ECHO Executing - yarn install ...
CALL yarn install || EXIT /B %ERRORLEVEL%
ECHO Executing - yarn pack ...
CALL yarn pack || EXIT /B %ERRORLEVEL%
ECHO Finished generating the tarball
CD %original_dir%
ECHO Executing - npm install remote ...
CALL npm i || EXIT /B %ERRORLEVEL%
ECHO Executing - npm install local ...
IF DEFINED npm_config_heimdall (
FOR /f "tokens=*" %%a IN ('dir /b %npm_config_heimdall%\libs\hdf-converters\mitre-hdf-converters-v*.tgz') DO (
SET THIS_TAR_ZIP=%npm_config_heimdall%\libs\hdf-converters\%%a
)
) ELSE (
FOR /f "tokens=*" %%a IN ('dir /b ..\heimdall2\libs\hdf-converters\mitre-hdf-converters-v*.tgz') DO (
SET THIS_TAR_ZIP=..\heimdall2\libs\hdf-converters\%%a
)
)
CALL npm i %THIS_TAR_ZIP% || EXIT /B %ERRORLEVEL%
ECHO Executing - npm run prepack ...
CALL npm run prepack || EXIT /B %ERRORLEVEL%
ECHO Install of local hdf-converters complete.