Skip to content

Allow installing from GIT at specific version #1923

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

Closed
3 tasks done
FStefanni opened this issue Oct 14, 2022 · 3 comments
Closed
3 tasks done

Allow installing from GIT at specific version #1923

FStefanni opened this issue Oct 14, 2022 · 3 comments
Assignees
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@FStefanni
Copy link

Describe the request

Hi,

currently the arduino-cli lib install --git-url command does not allow to specify a version.
So it could be useful to allow this, by supporting tag, branches and SHA ID's.

Git already support this with the --branch option.

So something as this should be fine:

arduino-cli lib install --git-url https://www.super.url/[email protected]
arduino-cli lib install --git-url https://www.super.url/repo@abcde
arduino-cli lib install --git-url https://www.super.url/repo@featurex-branch

Regards

Describe the current behavior

Currently always the latest commit on master/main is downloaded.

Arduino CLI version

0.27.1

Operating system

Linux

Operating system version

Debian testing

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the nightly build
  • My request contains all necessary details
@FStefanni FStefanni added the type: enhancement Proposed improvement label Oct 14, 2022
@per1234
Copy link
Contributor

per1234 commented Oct 14, 2022

Hi @FStefanni. Thanks for your request. I'm happy to tell you this capability has already been added thanks to a community contribution: #1776

@per1234 per1234 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2022
@per1234 per1234 added conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself labels Oct 14, 2022
@per1234 per1234 self-assigned this Oct 14, 2022
@FStefanni
Copy link
Author

Hi,

that's great.
Sorry, I tried with '@' as for normal libs, without success, and found no description in the doc.
So maybe this could be mentioned in the doc: for urls, use #.

Regards.

@per1234
Copy link
Contributor

per1234 commented Oct 14, 2022

It is demonstrated in the examples provided on the documentation website:

https://arduino.github.io/arduino-cli/dev/commands/arduino-cli_lib_install/#examples

And in the command line help:

$ ./arduino-cli lib install --help
Installs one or more specified libraries into the system.

Usage:
  arduino-cli lib install LIBRARY[@VERSION_NUMBER]... [flags]

Examples:
  arduino-cli lib install AudioZero       # for the latest version.
  arduino-cli lib install [email protected] # for the specific version.
  arduino-cli lib install --git-url https://github.com/arduino-libraries/WiFi101.git https://github.com/arduino-libraries/ArduinoBLE.git
  arduino-cli lib install --git-url https://github.com/arduino-libraries/WiFi101.git#0.16.0 # for the specific version.

Any suggestions for improvements on the documentation are welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants