Skip to content

Add build commit hash service and client helper#133

Merged
jonyMarino merged 1 commit intomainfrom
register_commit_at_build
Mar 18, 2026
Merged

Add build commit hash service and client helper#133
jonyMarino merged 1 commit intomainfrom
register_commit_at_build

Conversation

@jonyMarino
Copy link
Contributor

Fixes: #

About

This pull request adds support for tracking and exposing the build commit hash throughout the ProjectAirSim build and runtime environment. The changes ensure that the commit hash is captured at build time, propagated into the build artifacts, and made accessible via a new service method and client API.

Build system enhancements:

  • The build commit hash is captured during configuration in CMakeLists.txt using Git, with a fallback to "unknown" if unavailable. The hash is written to commit_hash.txt and displayed during configuration.
  • The commit hash is passed as a compile definition (PROJECTAIRSIM_BUILD_COMMIT_HASH) to the simulator target in core_sim/src/CMakeLists.txt.
  • The commit_hash.txt file is included in packaging steps for sim libs, ensuring the hash is available in distributed artifacts.

Simulator core changes:

  • The Simulator::Impl class now includes a GetBuildCommitHash() method, which returns the build commit hash using the compile definition. [1] [2]
  • A new service method, GetBuildCommitHash, is registered in the simulator, allowing clients to query the build commit hash at runtime.

Client API changes:

  • The Python client adds a get_build_commit_hash() method, which requests the build commit hash from the simulator via the new service method.

How Has This Been Tested?

Screenshots and videos (if appropriate):

@jonyMarino jonyMarino merged commit a86bf46 into main Mar 18, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants