diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..6a3e68d
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1 @@
+**/.DS_Store
\ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..c3f0b7f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,34 @@
+ARG IMAGE=intersystems/iris:2019.1.0S.111.0
+ARG IMAGE=store/intersystems/iris:2019.1.0.511.0-community
+FROM $IMAGE
+
+WORKDIR /opt/app
+
+COPY ./Installer.cls ./
+COPY ./cls/ ./src/
+
+# download ZPM
+RUN mkdir -p /tmp/deps \
+
+ && cd /tmp/deps \
+
+ && wget -q https://pm.community.intersystems.com/packages/zpm/latest/installer -O zpm.xml
+
+
+RUN iris start $ISC_PACKAGE_INSTANCENAME quietly EmergencyId=sys,sys && \
+ /bin/echo -e "sys\nsys\n" \
+ " Do ##class(Security.Users).UnExpireUserPasswords(\"*\")\n" \
+ " Do ##class(Security.Users).AddRoles(\"admin\", \"%ALL\")\n" \
+ " do ##class(Security.System).Get(,.p)\n" \
+ " set p(\"AutheEnabled\")=\$zb(p(\"AutheEnabled\"),16,7)\n" \
+ " do ##class(Security.System).Modify(,.p)\n" \
+ " Do \$system.OBJ.Load(\"/tmp/deps/zpm.xml\", \"ck\")" \
+ " Do \$system.OBJ.Load(\"/opt/app/Installer.cls\",\"ck\")\n" \
+ " Set sc = ##class(App.Installer).setup(, 3)\n" \
+ " If 'sc do \$zu(4, \$JOB, 1)\n" \
+ " halt" \
+ | iris session $ISC_PACKAGE_INSTANCENAME && \
+ /bin/echo -e "sys\nsys\n" \
+ | iris stop $ISC_PACKAGE_INSTANCENAME quietly
+
+CMD [ "-l", "/usr/irissys/mgr/messages.log" ]
\ No newline at end of file
diff --git a/Installer.cls b/Installer.cls
new file mode 100644
index 0000000..c484965
--- /dev/null
+++ b/Installer.cls
@@ -0,0 +1,29 @@
+Class App.Installer
+{
+
+XData MyInstall [ XMLNamespace = INSTALLER ]
+{
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+}
+
+ClassMethod setup(ByRef pVars, pLogLevel As %Integer = 3, pInstaller As %Installer.Installer, pLogger As %Installer.AbstractLogger) As %Status [ CodeMode = objectgenerator, Internal ]
+{
+ Quit ##class(%Installer.Manifest).%Generate(%compiledclass, %code, "MyInstall")
+}
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 43f2811..a2da1dd 100644
--- a/README.md
+++ b/README.md
@@ -1,40 +1,49 @@
-# cache-udl
-Export/Import sources in UDL format for [ISC Caché 2016.2](http://www.intersystems.com/our-products/cache/cache-overview/)
+# ISC-DEV
+
+[![Gitter](https://img.shields.io/badge/chat-on%20telegram-blue.svg)](https://t.me/joinchat/FoZ4MxGETT0_VsVglVl0DA)
+
+Export/Import source code (classes, macro, routines) and DeepSee artifacts (pivots, dashboards, termlists, pivot variables, shared measures) from and to InterSystems Data Platform products (Caché, Ensemble, IRIS). Support versions from 2016.2.
# Installation
Download code and run
```
-set dir="/dir/cache-udl
-do $System.OBJ.ImportDir(dir,"*.xml;*.cls;*.mac;*.int;*.inc;*.dfi","ck",,1)
+set dir="/your_download_dir/isc-dev
+do $System.OBJ.ImportDir(dir,"*.xml;*.cls;*.mac;*.int;*.inc;*.dfi","cuk",,1)
```
or
import the [release](https://github.com/intersystems-ru/cache-udl/releases) to the namespace.
-Map sc package to %All namespace to make it visible in any namespace.
+Map the sc package to the %All namespace to make it visible in any namespace.
# Usage
## Setup working directory ( optional )
```
-NS> w ##class(sc.code).workdir("/path/to/your/working/directory/")
+NS> w ##class(dev.code).workdir("/path/to/your/working/directory/")
```
## Export to working directory:
```
-NS> d ##class(sc.code).export()
+NS> d ##class(dev.code).export()
```
## Import:
```
-NS> d ##class(sc.code).import()
+NS> d ##class(dev.code).import()
```
## Compile, Release and Patch:
Introduce isc.json file in the source root directory with settings for the code mask, for the name of the project and for get the patch form local git or GitHub. e.g.
```
-"git": 0 - files diff from local git
+"git": 0 - files diff from local git (default)
"git": 1 - files diff from GitHub
+use below params in case of "git" : 1
+"owner": - name of the github e.g. intersystems-community
+"repository": - name of the repo e.g. dc-analytics
+ "user": - user and password for private github repo
+ "password":
```
+
```
isc.json
"compileList": "Classes*.INC,classes*.CLS,*.DFI",
@@ -47,25 +56,47 @@ isc.json
```
Run init method to initialize project settings:
```
-NS> d ##class(sc.code).init()
+NS> d ##class(dev.code).init()
```
-Then run release to export all the classes in comileList into one "myproject.xml" release file. It will export it into the default for current Namespace directory.
+Then run release() to export all the classes in compileList into one "myproject.xml" release file. It will export it into the default directory for the current Namespace.
```
-NS> d ##class(sc.code).release()
+NS> d ##class(dev.code).release()
```
-Or compile it whenever you want to compile all the proejct related resources.
+Or compile it whenever you want to compile all the project related resources.
```
-NS> d ##class(sc.code).compile()
+NS> d ##class(dev.code).compile()
```
-Get last changes from github or local git. Run patch to export the classes in comileList into one "patch.xml" patch file. It will export it into the default for current Namespace directory or you can choose where export. By default, makes a patch from the last commit if you do not specify `commitFrom` and `commitTo` e.g.
+Get the latest changes from github or local git. Run patch() to export the classes in compileList into one "patch.xml" patch file. It will export it into the default directory for the current Namespace or you can choose the export dir. By default, it makes a patch from the last commit if you do not specify `commitFrom` and `commitTo` e.g.
```
NS> s filename = "c:\patch.xml"
NS> s commitFrom = 1
NS> s commitTo = 5
-NS> d ##class(sc.code).patch(filename,commitFrom,commitTo)
+NS> d ##class(dev.code).patch(filename,commitFrom,commitTo)
```
+## Known issues
+Be careful with import termlists, pivot variables and shared measures. In the current implementation, imported artifacts replace those you have in the target namespace. It happens because the utility uses standard global import for globals in XML with $System.OBJ.Import which kills the global first and imports the new one.
+
+#### If after using the export command, git treats unaltered files as modified, the problem may be in the following:
+- When moving sources from one OS to another (e.g., from win to mac), the end of the line character was not taken into account. To fix this, you need to specify git to make the end of line character look the same.
+
+ solution: ```git config --global core.autocrlf input```
+- File access rights have been changed. In this case, you will need to specify that you do not want to track these changes.
+
+ solution: ```git config core.filemode false```
+
+## Development
+
+To update the module in ZPM do the following:
+USER> zpm
+zpm: USER>load /opt
+zpm: USER>repo -n registry -user USER -pass PASSWORD
+1) Filesystem
+2) Local Cache
+3) Remote Repository
+Which sort of repository do you wish to configure? 3
+zpm: USER>module-action isc-dev publish
diff --git a/cls/sc/code.cls b/cls/dev/code.cls
similarity index 80%
rename from cls/sc/code.cls
rename to cls/dev/code.cls
index fe7ec92..d17a2bd 100644
--- a/cls/sc/code.cls
+++ b/cls/dev/code.cls
@@ -1,13 +1,14 @@
/// Export different types of modules in different subfolders in UDL (plain) format
/// test.dfi -> /dfi/test.dfi
/// testpkg.test.cls -> /cls/testpkg/test.cls
-Class sc.code [ Abstract ]
+Class dev.code [ Abstract ]
{
+Parameter version = "1.1.0.4";
+
/// export all available code
-ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = "", dfi = 0)
+ClassMethod export(mask = "", generated = 0, system = 0, percent = 0, mapped = 0, dfi = 0)
{
-
#define export(%code, %file) s sc = $system.OBJ.ExportUDL(%code, %file,"/diffexport") ##continue
w:sc "Ok" d:'sc $system.OBJ.DisplayError(sc)
@@ -15,13 +16,6 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
#define isPercented(%code) ("%" = $e(%code))
#define isMapped(%code) ##class(%RoutineMgr).IsMapped( %code )
#define log w !, code, " -> ", $piece(filename,..workdir(),2), " "
-
- #define mkdir(%filename) ##continue
- s path = ##class(%File).GetDirectory( %filename ) ##continue
- if '##class(%File).DirectoryExists( path ) { ##continue
- s sc = ##class(%File).CreateDirectoryChain( path ) ##continue
- w !, "mkdir ", path, " ", sc ##continue
- }
w "#; Exporting to ", ..workdir(),!
#; classes
@@ -35,10 +29,10 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
if ( 'generated && $$$isGenerated( code ) ) continue
if ( 'percent && $$$isPercented( code ) ) continue
if ( 'mapped && $$$isMapped( code ) ) continue
- if ( '$find( code, mask ) ) continue
+ if ( '..checkMasks( code, mask ) ) continue
s filename = ..filename( code )
- $$$mkdir( filename )
+ do ..mkdir( filename )
$$$log
$$$export( code, filename )
@@ -56,10 +50,10 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
if ( 'generated && $$$isGenerated( code ) ) continue
if ( 'percent && $$$isPercented( code ) ) continue
if ( 'mapped && $$$isMapped( code ) ) continue
- if ( '$find( code, mask ) ) continue
+ if ( '..checkMasks( code, mask ) ) continue
s filename = ..filename( code )
- $$$mkdir( filename )
+ do ..mkdir( filename )
$$$log
$$$export( code, filename )
@@ -78,9 +72,14 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
set filename = ..filename( code_".dfi" )
set documentName = rs.documentName
- if ( '$find($zcvt(documentName,"l"), mask ) ) continue
if ($L(code,"$TRASH")>1) continue
- $$$mkdir( filename )
+
+ if ( 'generated && $$$isGenerated( code ) ) continue
+ if ( 'percent && $$$isPercented( code ) ) continue
+ if ( 'mapped && $$$isMapped( code ) ) continue
+ if ( '..checkMasks(documentName, mask) ) continue
+
+ do ..mkdir( filename )
if dfi{
$$$log
@@ -94,6 +93,9 @@ ClassMethod export(generated = 0, system = 0, percent = 0, mapped = 0, mask = ""
} s rs=""
+ #;DeepSee artefacts
+ do ..exportDeepSeeArtefacts()
+
w !,!, "#; Exported to ", ..workdir()
Q 1
@@ -157,6 +159,26 @@ ClassMethod import(filemask = "*.xml;*.cls;*.mac;*.int;*.inc;*.dfi", qspec = "ck
Q sc
}
+ClassMethod exportDeepSeeArtefacts() As %Status
+{
+ set sc = $$$OK
+ set artefacts = $listbuild("DeepSee.Variables","DeepSee.TermList","DeepSee.CalcMbrs")
+
+ for i=1:1:$listlength(artefacts)
+ {
+ set artefact = $list(artefacts,i)
+ continue:$data(@("^"_artefact))=0
+
+ set artefact = artefact_".GBL"
+ set filename = ..filename(artefact)
+ do ..mkdir(filename)
+
+ set sc = ..fixXMLLine(artefact, filename_".xml")
+ }
+
+ return sc
+}
+
ClassMethod patch(filename = "", commitFrom = "", commitTo = "") As %Status
{
s gln = ..gln()
@@ -165,7 +187,7 @@ ClassMethod patch(filename = "", commitFrom = "", commitTo = "") As %Status
set:commitTo="" commitTo=1
if (git = 0) {
set:(commitFrom="")||(commitFrom=1) commitFrom=0
- set sc = ##class(sc.diff.gitLocal).buildDiff(..workdir(), "HEAD~"_commitTo, "HEAD~"_commitFrom, .items)
+ set sc = ##class(dev.diff.gitLocal).buildDiff(..workdir(), "HEAD~"_commitTo, "HEAD~"_commitFrom, .items)
return:$$$ISERR(sc) sc
}elseif(git = 1) {
set owner = @gln@("owner")
@@ -174,7 +196,7 @@ ClassMethod patch(filename = "", commitFrom = "", commitTo = "") As %Status
set password = @gln@("password")
set:commitFrom="" commitFrom=1
- set sc = ##class(sc.diff.gitHub).Get(.items, owner, repository, user, password, commitFrom, commitTo)
+ set sc = ##class(dev.diff.gitHub).Get(.items, owner, repository, user, password, commitFrom, commitTo)
return:$$$ISERR(sc) sc
}
@@ -242,7 +264,10 @@ ClassMethod setIgnore(ByRef filtermask)
/// get or set working directory for export/import source
ClassMethod workdir(workdir)
{
- s gln = ..gln() s:$d(workdir) @gln = workdir
+ set:$d(workdir) workdir = ##class(%File).NormalizeDirectory(workdir)
+ s gln = ..gln()
+ s:$d(workdir) @gln = workdir
+
///zu(12) namespace directory by default
#define nsdir $zu(12,"")
Q $g(@gln, $$$nsdir)
@@ -256,11 +281,14 @@ ClassMethod gln() [ CodeMode = expression, Private ]
ClassMethod init(confile = "isc.json")
{
- set stream=##class(%Stream.FileCharacter).%New()
- set sc=stream.LinkToFile(..workdir()_"/"_confile)
+ q:..workdir()="" "workdir is empty"
+ q:'##class(%File).Exists(..workdir()_confile) "configuration file: "_confile_" not found in "_..workdir()
+
+ s stream=##class(%Stream.FileCharacter).%New()
+ s sc=stream.LinkToFile(..workdir()_confile)
s conf={}.%FromJSON(stream.Read($$$MaxCacheInt))
- s gln=..gln()
+ s gln = "^dev.code"
s @gln@("compileList")=conf.compileList
s @gln@("projectName")=conf.projectName
@@ -269,6 +297,7 @@ ClassMethod init(confile = "isc.json")
s @gln@("user")=conf.user
s @gln@("password")=conf.password
s @gln@("git")=conf.git
+ s:@gln@("git")="" @gln@("git")=0
w "compileList="_conf.compileList,!
w "projectName="_conf.projectName,!
@@ -333,11 +362,12 @@ ClassMethod filename(code)
s $p(filename,".",*)=ext
//B:code="DPRep.Rest.JSON.cls" "L"
#; for *.cls Package.Subpackage.ClassName.cls -> Folder/Subfolder/ClassName.cls
- if ext ="cls" {
+ if (ext="cls") || (ext="gbl") {
s dirs = $piece( code, ".",1, *-2 ), dirs = $translate( dirs, ".", "/" )
s relpath = dirs _ "/" _ $piece( code, ".", *-1, * ) ;
s filename = ##class(%File).NormalizeFilename( relpath, wd )
}
+
Q filename
}
@@ -443,5 +473,53 @@ ClassMethod fixDashIntoName()
k rs
}
+ClassMethod mkdir(filename As %String) As %Status
+{
+ s sc = $$$OK
+ s path = ##class(%File).GetDirectory(filename)
+ if '##class(%File).DirectoryExists(path)
+ {
+ s sc = ##class(%File).CreateDirectoryChain(path)
+ w !, "mkdir ", path, " ", sc
+ }
+ return sc
+}
+
+ClassMethod getVersion() [ CodeMode = expression ]
+{
+"Version: "_..#version
+}
+
+ClassMethod checkMasks(name As %String, masks As %String) As %Boolean
+{
+ return:masks="" 1
+ return:name="" 0
+
+ set name = $zcvt(name,"l")
+ set masks = $zcvt(masks,"l")
+
+ for i=1:1:$l(masks,",")
+ {
+ set pattern = "^"
+ set mask = $p(masks, ",", i)
+
+ for index=1:1:$l(mask)
+ {
+ set char = $e(mask, index)
+ set pattern = pattern _ $case(char,
+ ".":"\.",
+ "?":".",
+ "*":".*",
+ :char
+ )
+ }
+ set pattern = pattern _ "$|"
+ }
+ set pattern = $e(pattern,1,*-1)
+ set matcher=##class(%Regex.Matcher).%New(pattern, name)
+ do matcher.Locate()
+ return $select(matcher.Group="":0, 1:1)
+}
+
}
diff --git a/cls/dev/deepsee.cls b/cls/dev/deepsee.cls
new file mode 100644
index 0000000..4b0f419
--- /dev/null
+++ b/cls/dev/deepsee.cls
@@ -0,0 +1,71 @@
+Class dev.deepsee
+{
+
+ClassMethod checkDataSource(onlyerror As %Boolean = 1)
+{
+ set sc = $$$OK
+ &sql(DECLARE C1 CURSOR FOR SELECT ID into :id FROM %DeepSee_Dashboard.Definition)
+ &sql(OPEN C1)
+ &sql(FETCH C1)
+ WHILE (SQLCODE = 0)
+ {
+ set flag = 1
+ set dashbord = ##class(%DeepSee.Dashboard.Definition).%OpenId(id)
+ set widgets = dashbord.widgets
+
+ for i=1:1:widgets.Count()
+ {
+ set widget = widgets.GetAt(i)
+ set pivotName = widget.dataSource
+ set sc = ..getMdx(pivotName, .MDX)
+ set sc = ..checkPivot(MDX)
+
+ continue:sc&&onlyerror
+
+ w:flag=1 dashbord.name,!
+ w " pivot: ",pivotName," status: "_$select(sc'=1:$System.Status.GetErrorText(sc),1:"OK"),!
+ set flag = 0
+ }
+ &sql(FETCH C1)
+ }
+ &sql(CLOSE C1)
+}
+
+ClassMethod checkPivot(MDX As %String) As %Status
+{
+ set sc = $$$OK
+ set rs = ##class(%DeepSee.ResultSet).%New()
+
+ set sc = rs.%PrepareMDX(MDX)
+ return:$$$ISERR(sc) sc
+
+ set sc = rs.%ExecuteAsynch()
+ return:$$$ISERR(sc) sc
+
+ return sc
+}
+
+ClassMethod getMdx(pPivotName As %String, Output MDX) As %Status
+{
+ #dim tPivot As %DeepSee.Dashboard.Pivot
+ #dim tPivotTable As %DeepSee.Component.pivotTable
+ set MDX = ""
+
+ set tPivot = ##class(%DeepSee.UserLibrary.Utils).%OpenFolderItem(pPivotName,.sc)
+ return:'$IsObject(tPivot) $$$OK
+ return:$$$ISERR(sc) sc
+
+ set tPivotTable = ##class(%DeepSee.Component.pivotTable).%New()
+ set sc = tPivot.%CopyToComponent(tPivotTable)
+ return:$$$ISERR(sc) sc
+
+ set rs = tPivotTable.%CreateResultSet(.sc,,,,.MDX) // returns tQueryText - mdx without filters
+ return:$$$ISERR(sc) sc
+
+ set MDX = $TR(MDX,$C(10),"")
+
+ return sc
+}
+
+}
+
diff --git a/cls/sc/diff/gitHub.cls b/cls/dev/diff/gitHub.cls
similarity index 98%
rename from cls/sc/diff/gitHub.cls
rename to cls/dev/diff/gitHub.cls
index 48f28c4..4b55178 100644
--- a/cls/sc/diff/gitHub.cls
+++ b/cls/dev/diff/gitHub.cls
@@ -1,4 +1,4 @@
-Class sc.diff.gitHub
+Class dev.diff.gitHub
{
ClassMethod Get(Output items, Owner As %String = "", Repository As %String = "", Username As %String = "clminstaller", Password As %String = "clminstaller2016", CommitFrom As %Integer = "", CommitTo As %Integer = "") As %Status
@@ -66,7 +66,7 @@ ClassMethod GetFileNameForReleaseBySHAs(Request As %Net.HttpRequest, SHAsList, O
set fileName = files.GetAt(j).%data("filename")
set:$L(fileName,".xml")'=1 fileName = $extract(fileName,1,*-4)
continue:..IsCacheFile(fileName)=0
- do ##class(sc.diff.utils).ToCacheName(.fileName)
+ do ##class(dev.diff.utils).ToCacheName(.fileName)
set filesForRelease(fileName) = ""
}
}
diff --git a/cls/sc/diff/gitLocal.cls b/cls/dev/diff/gitLocal.cls
similarity index 87%
rename from cls/sc/diff/gitLocal.cls
rename to cls/dev/diff/gitLocal.cls
index 2bfe22b..4df6a54 100644
--- a/cls/sc/diff/gitLocal.cls
+++ b/cls/dev/diff/gitLocal.cls
@@ -1,4 +1,4 @@
-Class sc.diff.gitLocal
+Class dev.diff.gitLocal
{
/// Get diff between two points in repository
@@ -17,39 +17,44 @@ Class sc.diff.gitLocal
ClassMethod buildDiff(repo As %String, sha1 As %String, sha2 As %String, Output items) As %Status
{
$$$TOE(sc, ..createFile(.tempFile))
+ set oldDirectory = $system.Process.CurrentDirectory()
do $system.Process.CurrentDirectory(repo)
- $$$TOE(sc, ..execute($$$FormatText("git diff --name-status %1 %2 > %3 2>&3", sha1, sha2, tempFile)))
+ $$$TOE(sc, ..execute($$$FormatText("git diff --name-status %1 %2 > %3 2>&1", sha1, sha2, tempFile)))
$$$TOE(sc, ..fileToString(tempFile, .diffRaw))
+ set workdir = ##class(dev.code).workdir()
+ set path = ##class(dev.diff.utils).getLocalGitPathByWorkdir(workdir)
+
for i=1:1:$length(diffRaw, $c(10))
{
set element = $piece(diffRaw, $c(10), i)
set status = $e($piece(element, $c(9)))
set file = $piece(element, $c(9), 2)
- if ($l(file,"src/") < 2) continue
+ if ($l(file, path) < 2) continue
- set isRelevantFile = ##class(sc.diff.utils).isRelevantFile(file)
+ set isRelevantFile = ##class(dev.diff.utils).isRelevantFile(file)
if ((element="") || ('isRelevantFile)) continue
if $length(element, $c(9))=2
{
if ((status="M") || (status="U")) || (status="A")
{
- do ##class(sc.diff.utils).ToCacheName(.file)
+ do ##class(dev.diff.utils).ToCacheName(.file)
set items(file) = ""
}
}elseif $length(element, $c(9))=3
{
set file = $piece(element, $c(9), 3)
- if ($l(file,"src/") < 2) continue
+ if ($l(file, path) < 2) continue
if ((status="C") || (status="R"))
{
- do ##class(sc.diff.utils).ToCacheName(.newFile)
+ do ##class(dev.diff.utils).ToCacheName(.file)
set items(file) = ""
}
}
}
+ do $system.Process.CurrentDirectory(oldDirectory)
return sc
}
diff --git a/cls/sc/diff/utils.cls b/cls/dev/diff/utils.cls
similarity index 64%
rename from cls/sc/diff/utils.cls
rename to cls/dev/diff/utils.cls
index 58e49f8..002603d 100644
--- a/cls/sc/diff/utils.cls
+++ b/cls/dev/diff/utils.cls
@@ -1,11 +1,12 @@
-Class sc.diff.utils
+Class dev.diff.utils
{
Parameter TRACKEDEXT As List = {$lb("xml", "cls", "csp", "csr", "mac", "int", "bas", "inc", "gbl", "prj", "obj", "pkg", "gof", "dfi", "pivot", "dashboard")};
ClassMethod ToCacheName(ByRef filename)
{
- do:$L(filename,".xml")>1 ..getExtension(.filename)
+ if $get(filename)="" break
+ do:$L($zcvt(filename,"L"),".xml")>1 ..getExtension(.filename)
set str = $Select(
$L(filename,"cls/")>1:$Replace($P(filename,"cls/",2),"/","."),
$L(filename,"csp/")>1:$Replace($P(filename,"csp/",2),"/","."),
@@ -29,8 +30,31 @@ ClassMethod getExtension(ByRef filename)
set filename = $extract(filename,1,*-4)_".DFI"
}elseif ($L(filename,"cls/") > 1) {
set filename = $extract(filename,1,*-4)_".CLS"
+ }elseif ($L(filename,"gbl/") > 1) {
+ set filename = $p($extract(filename,1,*-4),"gbl/",2)
}
}
+ClassMethod getLocalGitPathByWorkdir(workdir As %String) As %String
+{
+ set path = ""
+ if ($L(workdir,"/") > 1) {
+ if ($P(workdir,"/",*) = "") {
+ set path = $P(workdir,"/",*-1)
+ }else {
+ set path = $P(workdir,"/",*)
+ }
+
+ }else {
+ if ($P(workdir,"\",*) = "") {
+ set path = $P(workdir,"\",*-1)
+ }else {
+ set path = $P(workdir,"\",*)
+ }
+ }
+
+ return path_"/"
+}
+
}
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..eada850
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,10 @@
+version: '2.4'
+services:
+ iris:
+ build: .
+ restart: always
+ ports:
+ - 52773:52773
+ volumes:
+ - ~/iris.key:/usr/irissys/mgr/iris.key
+ - .:/opt
\ No newline at end of file
diff --git a/isc.json b/isc.json
new file mode 100644
index 0000000..99f8aa5
--- /dev/null
+++ b/isc.json
@@ -0,0 +1,5 @@
+{
+ "compileList": "dev*.CLS",
+ "projectName": "dev",
+ "git": 0
+}
\ No newline at end of file
diff --git a/module.xml b/module.xml
new file mode 100644
index 0000000..830625b
--- /dev/null
+++ b/module.xml
@@ -0,0 +1,11 @@
+
+
+
+
+ isc-dev
+ 1.2.0
+ module
+
+
+
+