-
Notifications
You must be signed in to change notification settings - Fork 3
/
import.cmd
33 lines (29 loc) · 1.46 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
28
29
30
31
32
33
:: 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
:: Configurable variables: change them to fit your system ::
set CACHE_DIR=C:\Program Files\InterSystems\Ensemble
set NAMESPACE=DCANALYTICS
set USERNAME=_SYSTEM
set PASSWORD=SYS
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@echo off
:: Pre-configured variables
set BUILD_DIR=docs\cls
set XML_EXPORT_DIR=docs
set PACKAGE_NAME=EntityBrowser
:: Build and import application to Caché
echo Importing project...
call npm run gulp
(
echo %USERNAME%
echo %PASSWORD%
echo zn "%NAMESPACE%" set st = $system.Status.GetErrorText($system.OBJ.ImportDir("%~dp0%BUILD_DIR%",,"ck",,1^^^)^^^) w "IMPORT STATUS: "_$case(st="",1:"OK",:st^^^), !
echo s st = $system.Status.GetErrorText($system.OBJ.ExportPackage("%PACKAGE_NAME%", "%~dp0%XML_EXPORT_DIR%\%PACKAGE_NAME%-v"_##class(%PACKAGE_NAME%.Installer^^^).#VERSION_".xml"^^^)^^^) w $c(13,10^^^)_"EXPORT STATUS: "_$case(st="",1:"OK",:st^^^), ! halt
) | "%CACHE_DIR%\bin\cache.exe" -s "%CACHE_DIR%\mgr" -U %NAMESPACE%
:: Other utilities that may be useful:
::
:: Copy files to CSP folder
::$ set BUILD_STATIC_DIR=docs\static
::$ set CSP_DIR=C:\Program Files\InterSystems\Ensemble\CSP\samples\EntityBrowser
::$ call xcopy /sy "%~dp0\%BUILD_STATIC_DIR%" "%CSP_DIR%"