Library Manager - Adding GitHub hosted lib with multiple .zip releases

Hi there,

The idea is the following:
I would like to have a GitHub repository with a non 1.5 format folder structure.
The 1.5 format specification will be satisfied in the .zip releases files provided in the GitHub release section.

The questions are:

  • Would that satisfy the format 1.5 requirements? Or does the repository itself needs to follow the 1.5 format folder structure?
  • If there are several .zip release files, which would be the right naming for the Arduino Library manager to know which .zip file of the particular release is to be taken?
  • Will the new versions be automatically recognized and updated?

Thanks!

jaenrig:

  • Would that satisfy the format 1.5 requirements? Or does the repository itself needs to follow the 1.5 format folder structure?

There is no requirement for 1.5 library structure to add your library to the Arduino Library Manager index. You are welcome to have your library in the 1.0 library structure (at least one .h file in the repository's root folder). However, you are required to have a library.properties file in the repository's root folder, whether your library is in 1.5 or 1.0 format.

jaenrig:

  • If there are several .zip release files, which would be the right naming for the Arduino Library manager to know which .zip file of the particular release is to be taken?

There is no way to make the Library Manager indexer pick up a .zip file. It will clone the repository.

jaenrig:

  • Will the new versions be automatically recognized and updated?

The Library Manager indexer job regularly checks all repositories in the index for new tags (which are created when you do a GitHub release) and adds the new version to the index as long as it is compliant with all the Library Manager requirements.

I'd be happy to take a look at your repository to see if it is compliant with the requirements for addition to the Library Manager index and help you out to make it compliant if there are any issues. If you are interested in my assistance, just post a link to the repository.

More information:

Since we're on the topic, I'll mention that I have also written some scripts that automatically check compliance with the Library Manager requirements:

Thanks a lot Pert!
You have really gone deep through all my question:)

The major limitation to me is then knowing that I cannot release the JUST relevant content for an arduino library. So the library does not have to download for example test code, or other plaltforms code...

The idea is to have a repository for multiple platforms and then release for each of them with just the required sources... through an automated release process.
But since the library manager is checking the repository itself, I guess that will not be possible...
What about having a "release orphan branch" with the arduino library (even the 1.5 format)? Would it be possible for the library manager indexer to track just that branch?

The arduino lib checker is great! Thanks!
I was already in need of such a script.

jaenrig:
What about having a "release orphan branch" with the arduino library (even the 1.5 format)? Would it be possible for the library manager indexer to track just that branch?

There is no way to direct the indexer to a specific branch. It just looks for new tags in the repository and adds any tag that meets the requirements. So you could have a branch that is structured for the Library Manager and then push tags from that branch.

Another option would be to have a dedicated repository for the Arduino library, with the Library Manager compliant structure and then have that repository as a subtree or submodule of a separate repository that contains all the platforms.

jaenrig:
The arduino lib checker is great! Thanks!
I was already in need of such a script.

I'm glad if it is of use to you! I do initial triage on all the Library Manager submissions for Arduino. For a long time I would just manually check each repository for compliance but it kept getting more complicated as new requirements were added so eventually I decided it was worthwhile to automate the process. I have found it very useful for my purposes, but am not sure how many other people have used it.

Okay, I will then explore that possiblity of the release branch, and tag it... Otherwise we will have to live with having a repo with the arduino library only, or with more code than required.

But now it is clear :slight_smile:

Regarding the checker, I am also working in some automation and CI/CD processes, so definitively good to invest some time on it.

Thanks a lot once again!