Skip to content

Commit f302965

Browse files
authored
Merge pull request #84 from intersystems-community/deployed
support for deployed packages
2 parents dda02eb + 6c53e0b commit f302965

File tree

10 files changed

+428
-197
lines changed

10 files changed

+428
-197
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = false
12+
insert_final_newline = false
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: versionbump
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
release:
9+
types:
10+
- released
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Bump version
18+
run: |
19+
git config --global user.name 'ProjectBot'
20+
git config --global user.email '[email protected]'
21+
VERSION=$(sed -n '0,/.*<Version>\(.*\)<\/Version>.*/s//\1/p' module.xml)
22+
VERSION=`echo $VERSION | awk -F. '/[0-9]+\./{$NF++;print}' OFS=.`
23+
sed -i "0,/<Version>\(.*\)<\/Version>/s//<Version>$VERSION<\/Version>/" module.xml
24+
git add module.xml
25+
git commit -m 'auto bump version'
26+
git push

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
"Swagger spec": "http://${host}:${port}/registry/_spec",
1414
"All Packages": "http://${host}:${port}/registry/packages/-/all"
1515
},
16-
"server": "registry"
1716
},
1817
"objectscript.export": {
1918
"folder": "src",

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM containers.intersystems.com/intersystems/iris-community:2022.2.0.304.0
1+
FROM containers.intersystems.com/intersystems/iris-community:2022.2.0.311.0
22

33
WORKDIR /opt/registry
44

SQLPriv.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@
88
<Grantor>_SYSTEM</Grantor>
99
<Grantable>0</Grantable>
1010
</SQLPrivileges>
11+
<SQLPrivileges>
12+
<Namespace>REGISTRY</Namespace>
13+
<SQLObject>1,ZPM.DeployedPackage</SQLObject>
14+
<Privilege>s</Privilege>
15+
<Grantee>_PUBLIC</Grantee>
16+
<Grantor>_SYSTEM</Grantor>
17+
<Grantable>0</Grantable>
18+
</SQLPrivileges>
1119
<SQLPrivileges>
1220
<Namespace>REGISTRY</Namespace>
1321
<SQLObject>1,ZPM.Package_dependencies</SQLObject>

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Name>zpm-registry</Name>
66
<ExternalName>ZPM Registry</ExternalName>
77
<Description>Registry server for ZPM</Description>
8-
<Version>1.1.7</Version>
8+
<Version>1.1.9</Version>
99
<Packaging>module</Packaging>
1010
<Dependencies>
1111
<ModuleReference>

src/cls/ZPM/DeployedPackage.cls

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Class ZPM.DeployedPackage Extends (%Persistent, ZPM.Package)
2+
{
3+
4+
Property platformVersion As %String(%JSONFIELDNAME = "platform_version");
5+
6+
Index NameVersionPlatform On (name, version, platformVersion) [ IdKey, Unique ];
7+
8+
Method filepathGet() As %String [ CodeMode = expression ]
9+
{
10+
..name _ "/" _ ..platformVersion
11+
}
12+
13+
Property platformVersions As list Of %String(%JSONINCLUDE = "NONE") [ Transient ];
14+
15+
Storage Default
16+
{
17+
<Data name="DeployedPackageDefaultData">
18+
<Value name="1">
19+
<Value>%%CLASSNAME</Value>
20+
</Value>
21+
<Value name="2">
22+
<Value>package</Value>
23+
</Value>
24+
<Value name="3">
25+
<Value>size</Value>
26+
</Value>
27+
<Value name="4">
28+
<Value>manifest</Value>
29+
</Value>
30+
<Value name="5">
31+
<Value>hash</Value>
32+
</Value>
33+
<Value name="6">
34+
<Value>owner</Value>
35+
</Value>
36+
<Value name="7">
37+
<Value>description</Value>
38+
</Value>
39+
<Value name="8">
40+
<Value>keywords</Value>
41+
</Value>
42+
<Value name="9">
43+
<Value>license</Value>
44+
</Value>
45+
<Value name="10">
46+
<Value>homePage</Value>
47+
</Value>
48+
<Value name="11">
49+
<Value>repository</Value>
50+
</Value>
51+
<Value name="12">
52+
<Value>installer</Value>
53+
</Value>
54+
<Value name="13">
55+
<Value>versionMajor</Value>
56+
</Value>
57+
<Value name="14">
58+
<Value>versionMinor</Value>
59+
</Value>
60+
<Value name="15">
61+
<Value>versionPatch</Value>
62+
</Value>
63+
<Value name="16">
64+
<Value>versionPrerelease</Value>
65+
</Value>
66+
<Value name="17">
67+
<Value>versionBuildmetadata</Value>
68+
</Value>
69+
<Value name="18">
70+
<Value>publishTS</Value>
71+
</Value>
72+
<Value name="19">
73+
<Value>UpLink</Value>
74+
</Value>
75+
<Value name="20">
76+
<Value>deployed</Value>
77+
</Value>
78+
</Data>
79+
<Data name="dependencies">
80+
<Attribute>dependencies</Attribute>
81+
<Structure>subnode</Structure>
82+
<Subscript>"dependencies"</Subscript>
83+
</Data>
84+
<DataLocation>^ZPM.DeployedPackageD</DataLocation>
85+
<DefaultData>DeployedPackageDefaultData</DefaultData>
86+
<IdLocation>^ZPM.DeployedPackageD</IdLocation>
87+
<IndexLocation>^ZPM.DeployedPackageI</IndexLocation>
88+
<StreamLocation>^ZPM.DeployedPackageS</StreamLocation>
89+
<Type>%Storage.Persistent</Type>
90+
}
91+
92+
}

0 commit comments

Comments
 (0)