-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathimport.cmd
27 lines (24 loc) · 1.16 KB
/
import.cmd
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
:: This batch script makes the Caché application deployment much faster by building and importing the project.
:: Replace the variables below to match your Caché installation and build & import application to Caché using only one command.
:: Caché 2016.2+ IS REQUIRED TO PROCEED
@echo off
:: CHANGE THIS PATH TO YOUR CACHÉ INSTALLATION PATH ON WINDOWS (folder that contains bin, CSP, mgr and other folders)
set CACHE_DIR=C:\Program Files\InterSystems\Ensemble
:: NAMESPACE TO IMPORT PACKAGE TO
set NAMESPACE=SAMPLES
:: Other variables
set BUILD_DIR=build\cls
set BUILD_STATIC_DIR=build\static
set CSP_DIR=C:\Program Files\InterSystems\Ensemble\CSP\samples\EntityBrowser
:: User credentials. Remove if necessary.
set USERNAME=_SYSTEM
set PASSWORD=SYS
:: Build and import application to Caché
echo Importing project...
call npm run gulp
call xcopy /sy "%~dp0\%BUILD_STATIC_DIR%" "%CSP_DIR%"
(
echo %USERNAME%
echo %PASSWORD%
echo zn "SAMPLES" set st = $system.Status.GetErrorText($system.OBJ.ImportDir("%~dp0%BUILD_DIR%",,"ck /checkuptodate=all",,1^^^)^^^) w "IMPORT STATUS: "_$case(st="",1:"OK",:st^^^), ! halt
) | "%CACHE_DIR%\bin\cache.exe" -s "%CACHE_DIR%\mgr" -U %NAMESPACE%