Skip to content

Commit 2c52c0c

Browse files
committed
Add "Import" installation variable - import code from GitHub or SourceDir, defaults to 1, set to 0 to skip import
Fixes #60
1 parent 97e20b3 commit 2c52c0c

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

MDX2JSON/Installer.cls.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ todo add optional parameter WEBAPP to Alter web app name if it needs to have ano
1515
<Log Text="Set namespace to ${Namespace}" Level="0"/>
1616
</IfNotDef>
1717
18+
<IfNotDef Var="Import">
19+
<Var Name="Import" Value="1"/>
20+
<Log Text="Set Import to 1" Level="0"/>
21+
</IfNotDef>
22+
1823
<Role Name="MDX2JSONSettings" Description="Role to access and set default MDX2JSON settings for an App"/>
1924
2025
<If Condition='(##class(Config.Namespaces).Exists("${Namespace}")=0)'>
@@ -28,6 +33,8 @@ todo add optional parameter WEBAPP to Alter web app name if it needs to have ano
2833
</If>
2934
3035
<Namespace Name="${Namespace}" Create="no">
36+
37+
<If Condition="${Import}">
3138
<IfDef Var="SourceDir">
3239
<Log Text="SourceDir defined - offline install from ${SourceDir}" Level="0"/>
3340
<Import File="${SourceDir}"/>
@@ -36,6 +43,8 @@ todo add optional parameter WEBAPP to Alter web app name if it needs to have ano
3643
<Log Text="SourceDir undefined - online install from GitHub" Level="0"/>
3744
<RunInstall Class="MDX2JSON.Installer" Method="DownloadFromGitHub"/>
3845
</IfNotDef>
46+
</If>
47+
3948
<If Condition='(##class(Security.Applications).Exists("/"_"${Namespace}")=0)'>
4049
<Log Text="Creating web application /${Namespace}" Level="0"/>
4150
<!-- This method creates conflits with web-server. Kept for reference purposes. See ##class(%EnsembleMgr).createPortalApp()
@@ -87,6 +96,7 @@ Main setup method
8796
Set pVars("User")="web"
8897
Set pVars("Password")="dsweb"
8998
Set pVars("Namespace")="TEMP3"
99+
Set pVars("Import")=1
90100
Set pVars("SourceDir")="C:\temp\MDX2JSON\MDX2JSON"
91101
Do ##class(MDX2JSON.Installer).setup(.pVars)</Description>
92102
<Internal>1</Internal>

MDX2JSON/Tests.cls.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ Classes with support methods for testing MDX2JSON</Description>
88

99
<Parameter name="LastCommit">
1010
<Type>%String</Type>
11-
<Default>4bee06a52e843e90b6eedfcc11a1ee4cb5002930</Default>
11+
<Default>97e20b358814e01cd968e73d108a83095ff9bfeb</Default>
1212
</Parameter>
1313

1414
<Parameter name="LastCommitTS">
1515
<Type>%TimeStamp</Type>
16-
<Default>2017-02-11 16:18:23.367</Default>
16+
<Default>2017-02-14 08:51:51.111</Default>
1717
</Parameter>
1818

1919
<Method name="ProjectLength">

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ As a first parameter to `Do ##class(MDX2JSON.Installer).setup(.pVars)` you can p
5050
- `User` is a Caché user to create or modify. He will be given SELECT access to %DeepSee_Dashboard.Definition table in `Namespace`
5151
- `Password` must be supplied alongside User parameters
5252
- `SourceDir` - all xmls from this directory would be imported and compiled
53+
- `Import` - import code from GitHub or `SourceDir`, defaults to 1, set to 0 to skip import
5354

5455

5556
Update

0 commit comments

Comments
 (0)