add a script to print markdown list of submodule states #1256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This script mainly uses awk to look through the submodule states and
retrieve their versions. If a submodule is not on a clean version tag,
then we fall back to just linking to the commit its on.
Besides awk, this script also requires a version of git that has the
-C
flag (>= 1.8.5, very easy on any newer systems, I've only run into issueswith this requirement on CentOS7 systems.) and all submodules to have
their remote named
origin
which is thegit
default so I expect onlysuper-users to see issues.
Use Case
This is helpful for anyone writing release notes. You can run this script and then copy the output into the release notes markdown to give an itemized list of the submodules linked to the commit/release that is included in that release.
In the future, we could look at including this script as part of a larger automatic release notes creation function. The current release notes generator just lists the PRs that were merged and then other notes are written manually. This script could be apart of a system that would itemize the list of PRs and the submodule versions and then leave a space for manually written notes at the top.