Skip to content

Conversation

@Flamefire
Copy link
Contributor

Running this on a recursively cloned git repository will show all submodules, its path and commit hash formatted as a Python dict which can be used in easyconfigs.

I needed this recently for an easyconfig.
Result was:

 {
    'amqpcpp': ('CopernicaMarketingSoftware/AMQP-CPP', '6ddabe4', 'lib/metricq/lib/amqpcpp'),
    'asio': ('chriskohlhoff/asio', 'fa27820c0', 'lib/metricq/lib/asio'),
    'Catch': ('catchorg/Catch2', '7c9f92bc', 'lib/metricq/lib/nitro/tests/Catch'),
    'Catch': ('catchorg/Catch2', '7c9f92bc', 'lib/plugin_cxx_wrapper/lib/nitro/tests/Catch'),
    'common': ('mem/plugin_common', '1aa933b', 'lib/plugin_cxx_wrapper/common'),
    'date': ('HowardHinnant/date', '6e921e1', 'lib/metricq/lib/date'),
    'fmt': ('fmtlib/fmt', '7bdf0628', 'lib/metricq/lib/fmt'),
    'metricq': ('metricq/metricq-cpp', '40018cb', 'lib/metricq'),
    'metricq-protobuf': ('metricq/metricq-protobuf', '733b836', 'lib/metricq/lib/metricq-protobuf'),
    'nitro': ('energy/nitro', 'ac613d6', 'lib/plugin_cxx_wrapper/lib/nitro'),
    'nitro': ('energy/nitro', 'e117e60', 'lib/metricq/lib/nitro'),
    'plugin_cxx_wrapper': ('mem/plugin_cxx_wrapper', '7adb5a9', 'lib/plugin_cxx_wrapper'),
}

Running this on a recursively cloned git repository will show all
submodules, its path and commit hash formatted as a Python dict which
can be used in easyconfigs.
@@ -0,0 +1,33 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Flamefire Please include a license header, which also mentions author

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@boegel boegel added this to the 5.x milestone Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants