Skip to content

Install library or core from GitHub branch or commit #1113

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

Open
woolseyj opened this issue Dec 26, 2020 · 4 comments
Open

Install library or core from GitHub branch or commit #1113

woolseyj opened this issue Dec 26, 2020 · 4 comments
Labels
topic: CLI Related to the command line interface type: enhancement Proposed improvement

Comments

@woolseyj
Copy link

Feature Request

In order to assist in development and testing, I would like to request the ability to install a core or library from a GitHub based branch or commit. Something like the following is what I was thinking.

$ arduino-cli core install arduino:megaavr@branch:master
or
$ arduino-cli lib install WiFiNINA@commit:473d8b0

@per1234
Copy link
Contributor

per1234 commented Dec 27, 2020

master and 473d8b0 are both Git refs, so there's no need to give them different treatment.

$ arduino-cli lib install WiFiNINA@commit:473d8b0

I think it would be unnecessarily limiting to use the library name, because that only allows installing libraries that are in the Library Manager index. Better would be to allow specifying a Git ref via the existing arduino-cli lib install --git-url command.

$ arduino-cli core install arduino:megaavr@branch:master

It would be necessary to specify the repository URL. It it also necessary to specify the platform name because the repository doesn't contain this information. Another consideration is that not all platforms are in the root of the repository. Some (e.g., MightyCore) are structured with the platform under the architecture folder to allow easy manual installation. So to be universally useful this command would either need to allow the user to specify the installation source path relative to the root of the repository, or to automagically detect this path (e.g., search recusively for boards.txt)

@alranel
Copy link
Contributor

alranel commented Dec 31, 2020

Another more modular approach could be to just accept a local path, and let the user clone the repo instead of embedding the git clone semantics in arduino-cli.

@ubidefeo
Copy link

@alranel you can install libraries from local paths by supplying the path to a zip file with --zip-path.
remember that to enable installation of libraries from git URLs and zip files you need to enable library.enable_unsafe_install: true in your config file or as an ENV variable

library:
  enable_unsafe_install: true

@alranel
Copy link
Contributor

alranel commented Jan 8, 2021

Yeah @ubidefeo, however that's not available for cores :)

@per1234 per1234 reopened this Mar 30, 2021
@rsora rsora removed the topic: CLI label Sep 16, 2021
@rsora rsora added topic: core topic: CLI Related to the command line interface labels Sep 22, 2021
joewreschnig added a commit to joewreschnig/arduino-cli that referenced this issue Jun 19, 2022
This is done by providing the desired revision in the fragment, e.g.
`…/Library.git#0.1.0`. When set, this disables the clone depth limit so
all remote references will be available.
joewreschnig added a commit to joewreschnig/arduino-cli that referenced this issue Jun 19, 2022
This is done by providing the desired revision in the fragment, e.g.
`…/Library.git#0.1.0`. When set, this disables the clone depth limit so
all remote references will be available.
joewreschnig added a commit to joewreschnig/arduino-cli that referenced this issue Jun 19, 2022
This is done by providing the desired revision in the fragment, e.g.
`…/Library.git#0.1.0`. When set, this disables the clone depth limit so
all remote references will be available.
joewreschnig added a commit to joewreschnig/arduino-cli that referenced this issue Jun 19, 2022
This is done by providing the desired revision in the fragment, e.g.
`…/Library.git#0.1.0`. When set, this disables the clone depth limit so
all remote references will be available.
joewreschnig added a commit to joewreschnig/arduino-cli that referenced this issue Jun 29, 2022
This is done by providing the desired revision in the fragment, e.g.
`…/Library.git#0.1.0`. When set, this disables the clone depth limit so
all remote references will be available.
cmaglie pushed a commit that referenced this issue Jul 22, 2022
)

This is done by providing the desired revision in the fragment, e.g.
`…/Library.git#0.1.0`. When set, this disables the clone depth limit so
all remote references will be available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: CLI Related to the command line interface type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

6 participants