-
Notifications
You must be signed in to change notification settings - Fork 48
feat: simplify init command to better manage target MES version #736
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: development-6x
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -99,14 +99,10 @@ public void Execute(IDirectoryInfo workingDir, string version) | |
| { | ||
| int majorVersion = ExecutionContext.Instance.ProjectConfig.MESVersion.Major; | ||
| var ngxSchematicsVersion = ExecutionContext.Instance.ProjectConfig.NGXSchematicsVersion; | ||
| if (ngxSchematicsVersion == null) | ||
| { | ||
| throw new CliException("Seems like the repository scaffolding was run on a previous version of MES. Please re-init for versions 10+."); | ||
| } | ||
|
|
||
| var mesVersion = ExecutionContext.Instance.ProjectConfig.MESVersion; | ||
|
|
||
| this.schematicsVersion = ngxSchematicsVersion.ToString() ?? $"@release-{mesVersion.Major}{mesVersion.Minor}{mesVersion.Build}"; | ||
| this.schematicsVersion = ngxSchematicsVersion ?? $"release-{mesVersion.Major}{mesVersion.Minor}{mesVersion.Build}"; | ||
|
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. I don't see any usage of this here. Where is this used?
Author
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. If removed the test Help_v11 breaks because it's trying to do a npm install, do you want me to investigate further? |
||
|
|
||
| //Switch between v10 and v11 template | ||
| switch (majorVersion) | ||
|
|
||
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.
If this is no longer a required option, what is its default value?
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.
Applied the default value here and removed the attributions in Execute()