Store common module repo hashes and more for reproducible builds#59
Merged
Conversation
…e builds * Add `CURRENT_BUILD_REPO_HASHES` (JSON) and `CURRENT_BUILD_SCRIPT_HAD_UNCOMMITTED_CHANGES` in add_build_constants. * Move git helpers into `GitUtility` * Add `CommonModulesUtility` for building common-module repo hashes. * Add some documentation to README
SerhatG
reviewed
Mar 4, 2026
And add `$prompt_on_uncommitted_changes` to control the prompting behavior.
BertScholten
requested changes
Mar 4, 2026
- Introduced `run_git` method to centralize git command execution and reduce code duplication. - Updated methods to use `run_git` for retrieving git hash, remote URL, and checking for uncommitted changes. - Changed references in `ScriptCommands` to use the new `get_git_short_hash_for_path` method.
- Refactored the behavior for uncommitted or untracked changes detection to support three modes: :warn, :prompt, and :abort. - Replaced the `$prompt_on_uncommitted_changes` variable with `$on_uncommitted_changes` for clearer configuration. - Enhanced user interaction by changing input method for confirmation when prompting.
Return the abbreviated hash (like we did before) and raise if the hash is bigger than 10 characters.
Change `CURRENT_BUILD_COMMON_MODULE_REPO_HASHES` structure to use arrays for `sql_paths` and `data_paths` to support multiple paths per repository.
Will fix this in a seperate PR because there are more utility classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CURRENT_BUILD_COMMON_MODULE_REPO_HASHES(JSON) andCURRENT_BUILD_SCRIPT_HAD_UNCOMMITTED_CHANGESin add_build_constants.GitUtilityCommonModulesUtilityfor building common-module repo hashes.CURRENT_BUILD_COMMON_MODULE_REPO_HASHESJSON constant.warn/prompt/abortwhen uncommitted changes are detected ($on_uncommitted_changes). Default is set towarn.