-
-
Notifications
You must be signed in to change notification settings - Fork 403
Provide package indexes from file paths using "additional-paths" flag #1093
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
Conversation
73901b4
to
00f9d35
Compare
@@ -104,6 +104,7 @@ func createCliCommandTree(cmd *cobra.Command) { | |||
cmd.PersistentFlags().StringVar(&outputFormat, "format", "text", "The output format, can be {text|json}.") | |||
cmd.PersistentFlags().StringVar(&configFile, "config-file", "", "The custom config file (if not specified the default will be used).") | |||
cmd.PersistentFlags().StringSlice("additional-urls", []string{}, "Comma-separated list of additional URLs for the Boards Manager.") | |||
cmd.PersistentFlags().StringSlice("additional-paths", []string{}, "Comma-separated list of additional file paths for the Boards Manager.") |
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.
You need to add this new key also in cli/config/validate.go
, otherwise you won't be able to edit from the CLI.
See #1082
commands/instances.go
Outdated
jsonPaths := []string{} | ||
jsonPaths = append(jsonPaths, configuration.Settings.GetStringSlice("board_manager.additional_paths")...) | ||
|
||
for _, x := range jsonPaths { |
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.
You're not using jsonPaths
anywhere else other than the for
, you could do this to simplify:
for _, x := range configuration.Settings.GetStringSlice("board_manager.additional_paths") {
Same thing for the other in createInstance()
.
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.
There are some small changes to make but overall the PR is good.
00f9d35
to
7fc92e4
Compare
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.
LGTM 👍
Please check if the PR fulfills these requirements
before creating one)
our contributing guidelines
It introduces a new flag
additional-paths
that allows to provide package indexes from absolute file paths. In this case, the signature will not be checked. This can be useful for third party cores, since they will not be requested to upload their package indexes to a server. However it can also be useful for Arduino internal usage during testing phases.Package indexes can be downloaded only from URL. In case of Arduino cores, the signature is always checked and if a valid signature is not found, the core installation fails. There is no way to test a new Arduino package index that has no signature yet.
Package indexes can be provided also from the absolute file path and the signature will not be checked. An Arduino package index without a signature can be provided in this way.
No, it does not. It introduces a new feature that should not impact on the already implemented ones.
This PR will be needed for the Arduino core release automation workflow. Tests on the core with arduino-cli will need to run when there is no signature yet.
See how to contribute