-
Notifications
You must be signed in to change notification settings - Fork 28
Adding zpm "ci" command to install from a lock file #1080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
26c1f47
dedd323
6a759be
90daa5e
15eed15
d5bdbc1
7ad4aa2
8574b03
bdecd8b
405afad
827ae62
a4a52ac
ac17844
9fca7e0
f6dfc4b
4c6602a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -357,11 +357,21 @@ ClassMethod ScanDirectory( | |
| quit tSC | ||
| } | ||
|
|
||
| ClassMethod LockFileValuesToModifiers( | ||
| lockFileValues As %DynamicObject, | ||
| Output modifiers) | ||
| { | ||
| set modifiers("filesystem") = "" | ||
| set modifiers("name") = lockFileValues.%Get("name") | ||
| set modifiers("path") = lockFileValues.%Get("root") | ||
| set modifiers("depth") = lockFileValues.%Get("depth") | ||
| set modifiers("read-only") = lockFileValues.%Get("readOnly") | ||
| } | ||
|
|
||
| XData LockFileMapping | ||
| { | ||
| <Mapping xmlns="http://www.intersystems.com/jsonmapping"> | ||
| <Property Name="LockFileType" FieldName="type" /> | ||
| <Property Name="OverriddenSortOrder" FieldName="overriddenSortOrder" /> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Out of curiosity, what's the reason we're removing this? |
||
| <Property Name="ReadOnly" FieldName="readOnly" /> | ||
| <Property Name="Root" FieldName="root" /> | ||
| <Property Name="Depth" FieldName="depth" /> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -154,11 +154,34 @@ Method GetPublishingManager(ByRef status) | |
| return ##class(%IPM.Repo.Oras.PublishManager).%Get(.status) | ||
| } | ||
|
|
||
| ClassMethod LockFileValuesToModifiers( | ||
| lockFileValues As %DynamicObject, | ||
| Output modifiers) | ||
| { | ||
| set modifiers("oras") = "" | ||
| set modifiers("name") = lockFileValues.%Get("name") | ||
| set modifiers("read-only") = lockFileValues.%Get("readOnly") | ||
| set modifiers("url") = lockFileValues.%Get("url") | ||
| set modifiers("namespace") = lockFileValues.%Get("orasNamespace") | ||
|
|
||
| // The following variables are set as system level variables for us to get | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should end up being documented somewhere else too. Definitely in the wiki and maybe even in the help text from |
||
| // Naming convention for those follow the name of the repository, first converting any '-' to '_', | ||
| // then removing everything except for alphabetic characters, numbers, and '_' to use as variable prefix | ||
| // lastly, adds a suffix based on the modifier | ||
| // Examples: <repo name> - <prefix> | ||
| // "registry" - "registry" | ||
| // "ORAS!Repo(5)?" - "ORASRepo5" | ||
| // "My-Repository-2" - "My_Repository_2" | ||
| set prefix = $zstrip($replace(modifiers("name"), "-", "_"), "*E'N'A") | ||
| set modifiers("username") = $system.Util.GetEnviron(prefix_"_username") | ||
| set modifiers("password") = $system.Util.GetEnviron(prefix_"_password") | ||
| set modifiers("token") = $system.Util.GetEnviron(prefix_"_token") | ||
| } | ||
|
|
||
| XData LockFileMapping | ||
| { | ||
| <Mapping xmlns="http://www.intersystems.com/jsonmapping"> | ||
| <Property Name="LockFileType" FieldName="type" /> | ||
| <Property Name="OverriddenSortOrder" FieldName="overriddenSortOrder" /> | ||
| <Property Name="ReadOnly" FieldName="readOnly" /> | ||
| <Property Name="URL" FieldName="url" /> | ||
| <Property Name="Namespace" FieldName="orasNamespace" /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, why not move this file into the
.../IPM/General/LockFiledirectory?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was to be consistent with other directory paths under
.../IPM/General/.LogManager,SemanticVersion, andSemanticVersionExpressionall have class files directly underGeneral/with directories to hold other classes that are related