Updating a library to new version.

I was under the impression that if I created a new version of a library in github, it would automatically update the one called for in the IDE library manager. But I seem to be missing a step

I created a new version of LB_baseTools and the IDE never seems to pick up on it. All it shows is 1.0.0 installed.

Am I missing something?

Thanks!

-jim lee

Hi @jimLee. The problem is that you forgot to update the "version" value in library.properties before making your v1.1 release.

You can see that it's the same in both the v1.0:

version=1.0

and v1.1:

version=1.0

The units of the Library Manager index are the Git tags, but everthing else is based on the library.properties metadata file. The actual name of the tag (v1.0 and v1.1 in your case) is completely ignored. This is a bit confusing because tags are often named according to version numbers (as is very sensible), but they can have any arbitrary name.

So the indexer job compared the library.properties version value of each of your repository's tags to the existing entries in the index for the library and found that there were no new versions available. So it sees your v1.1 release, but ignores it.

You will need to update the library.properties version value and then either make a new release or redo the existing release. It's not generally considered good practice to change existing tags, since they are sort of considered a permanent landmark pointing to a specific point in the commit history, but probably redoing it won't cause any big problems if you decide that's necessary.

Cool! That worked.

Its pretty sad that the version information is held in two different places. And github gives me no end of trouble telling me that whatever tag I put in there is not valid. Then it gives examples of valid tags and there's no difference.

Anyway, got it working and the new version showed up in my IDE. Pretty cool!

Thanks a lot for the help. I really appreciate it.

-jim lee

jimLee:
Its pretty sad that the version information is held in two different places.

The reason is that the tag name is only recorded in the Git repository, but the Arduino IDE needs version information for the libraries installed on your computer so it can tell when a newer version is available from the index. The installed Arduino libraries are not usually Git repositories (the average Arduino user doesn’t even use Git) so the Arduino IDE can’t get the infromation from Git. So the library must have its own metadata.

Conversely, Git was created long before Arduino and doesn’t know or care about library.properties.

So these are two separate things.

It can also sometimes be useful to make GitHub releases/Git tags (every GitHub release creates a Git tag, so a GitHub release is really just a little extra data specific to the GitHub system which is associated with a Git tag) without publishing a new version to the Arduino Library Manager index. An example would be an “RC” (release candidate) tag, which is intended only for use by beta testers to make sure there are no bugs before doing the production release which is published to Library Manager.

jimLee:
Anyway, got it working and the new version showed up in my IDE. Pretty cool!

Thanks a lot for the help. I really appreciate it.

You’re welcome. I’m glad to hear it’s working now.