I maintain a handful of open source projects on GitHub and have had a few questions about maintaining software like this, specifically around versioning and maintenance. I don't think there is a single "right" answer but the discussion might help others working on their own libraries.
I work on .NET libraries though would be interested in answers to these questions for any language/platform/package manager.
This question is quite broad and by itself, doesn't seem particularly useful. What I mean though is like, if you have someone raise an issue and you patch it, do you immediately release a new version of the library? Do you wait an arbitrary amount of time before releasing? Do you try and queue up multiple changes together before releasing?
Again, kinda a broad question on the surface. I know various package managers would have CLI tools or might just read the "releases" or tags on GitHub. What I'm interested in here is the process of actually bumping a version number of your library and getting it out.
For example, I work with .NET and currently have the version number in a
*.props file which is read during the build. This version is manually updated in an "update version" commit (eg. "Version 1.0 Released"). I then add a release to GitHub with the same version number and set it to create a tag with that same version number.
Now, I take the built package from the CI server (as it fires off a build when the tag is created) and I manually login to NuGet, uploading the package.
Now I know I could at least automate the pushing to NuGet but is that a good thing to do here? Should I even be letting certain CI builds just automatically push to NuGet? Should these be bumping their own "patch" version numbers? Would I be pushing out too many releases then?
This is probably the most important/curious question of the 3 that I have. Any thoughts on this stuff would be awesome.
How do you approach maintaining old versions of the code base, particularly when they are a major version behind?
I follow Semantic Versioning so I already considering breaking changes requiring a major version bump.
If someone is working on an older version of the library, do you go back and fork off the code base from that version and have it with the new fix? Do you just tell people to upgrade to your latest (major change) version which has it fixed? Is it something else in between?
When I have worked with open source products (eg. CMSs), they do normally maintain a few major versions back and patch with security updates. Do people do that with libraries too? Do you just maintain a "cutting edge" version of the library? Is this more a case of resources/time to be able to maintain a series of patch versions of older releases?
(open source and trusted by devs everywhere ❤️)