Skip to content

Commit 200fc49

Browse files
Missed import scripts add
1 parent 4a9ad46 commit 200fc49

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

import.cmd

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:: This batch script makes the Caché application deployment much faster by building and importing the project.
2+
:: Replace the variables below to match your Caché installation and build & import application to Caché using only one command.
3+
4+
:: Caché 2016.2+ IS REQUIRED TO PROCEED
5+
@echo off
6+
7+
:: CHANGE THIS PATH TO YOUR CACHÉ INSTALLATION PATH ON WINDOWS (folder that contains bin, CSP, mgr and other folders)
8+
set CACHE_DIR=C:\Program Files\InterSystems\Ensemble
9+
:: NAMESPACE TO IMPORT PACKAGE TO
10+
set NAMESPACE=SAMPLES
11+
:: Other variables
12+
set BUILD_DIR=build\cls
13+
set BUILD_STATIC_DIR=build\static
14+
set CSP_DIR=C:\Program Files\InterSystems\Ensemble\CSP\samples\EntityBrowser
15+
:: User credentials. Remove if necessary.
16+
set USERNAME=_SYSTEM
17+
set PASSWORD=SYS
18+
19+
:: Build and import application to Caché
20+
echo Importing project...
21+
call npm run gulp
22+
call xcopy /sy "%~dp0\%BUILD_STATIC_DIR%" "%CSP_DIR%"
23+
(
24+
echo %USERNAME%
25+
echo %PASSWORD%
26+
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
27+
) | "%CACHE_DIR%\bin\cache.exe" -s "%CACHE_DIR%\mgr" -U %NAMESPACE%

import.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
# This batch script makes the Caché application deployment much faster by building and importing the project.
3+
# Replace the variables below to match your Caché installation and build & import application to Caché using only one command.
4+
5+
# Caché 2016.2+ IS REQUIRED TO PROCEED
6+
set +v
7+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
8+
9+
# CHANGE THIS PATH TO YOUR CACHÉ INSTALLATION PATH (folder that contains bin, CSP, mgr and other folders)
10+
CACHE_DIR=/InterSystems/Cache
11+
# NAMESPACE TO IMPORT PACKAGE TO
12+
NAMESPACE=SAMPLES
13+
# Other variables
14+
BUILD_DIR=build/cls
15+
BUILD_STATIC_DIR=build/static
16+
CSP_DIR=/InterSystems/Cache/csp/samples/EntityBrowser
17+
# Credentials
18+
USERNAME=_SYSTEM
19+
PASSWORD=SYS
20+
21+
# Build and import application to Caché
22+
echo "Importing project..."
23+
npm run gulp
24+
cp -R "$DIR/$BUILD_STATIC_DIR"* "$CSP_DIR"
25+
cat <<EOT | "$CACHE_DIR/bin/cache" -s "$CACHE_DIR/mgr" -U $NAMESPACE
26+
$USERNAME
27+
$PASSWORD
28+
set st = \$system.Status.GetErrorText(\$system.OBJ.ImportDir("$DIR/$BUILD_DIR",,"ck /checkuptodate=all",,1))
29+
write "IMPORT STATUS: "_\$case(st="",1:"OK",:st), ! halt
30+
EOT

0 commit comments

Comments
 (0)