Skip to content

Store common module repo hashes and more for reproducible builds#59

Merged
JacobusXIII merged 14 commits into
aerius:mainfrom
JacobusXIII:reproducable-builds-part1
Apr 7, 2026
Merged

Store common module repo hashes and more for reproducible builds#59
JacobusXIII merged 14 commits into
aerius:mainfrom
JacobusXIII:reproducable-builds-part1

Conversation

@JacobusXIII
Copy link
Copy Markdown
Contributor

@JacobusXIII JacobusXIII commented Mar 4, 2026

  • Add CURRENT_BUILD_COMMON_MODULE_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 view for flattening CURRENT_BUILD_COMMON_MODULE_REPO_HASHES JSON constant.
  • Add optional warn / prompt / abort when uncommitted changes are detected ($on_uncommitted_changes). Default is set to warn.
  • Add some documentation to README.

…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
@JacobusXIII JacobusXIII marked this pull request as draft March 4, 2026 10:39
Comment thread README.md Outdated
@JacobusXIII JacobusXIII changed the title Store common module repo hashes and uncommitted state for reproducibl… Store common module repo hashes and more for reproducibla builds Mar 4, 2026
@JacobusXIII JacobusXIII marked this pull request as ready for review March 4, 2026 13:52
@SerhatG SerhatG changed the title Store common module repo hashes and more for reproducibla builds Store common module repo hashes and more for reproducible builds Mar 4, 2026
And add `$prompt_on_uncommitted_changes` to control the prompting behavior.
Comment thread bin/CommonModulesUtility.rb Outdated
Comment thread bin/GitUtility.rb
Comment thread bin/GitUtility.rb Outdated
Comment thread bin/GitUtility.rb Outdated
Comment thread bin/GitUtility.rb Outdated
Comment thread bin/Settings.rb Outdated
- 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.
@JacobusXIII JacobusXIII requested a review from BertScholten March 9, 2026 11:00
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.
Comment thread bin/Build.rb Outdated
Will fix this in a seperate PR because there are more utility classes
Copy link
Copy Markdown
Member

@BertScholten BertScholten left a comment

Choose a reason for hiding this comment

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

LGTM

@JacobusXIII JacobusXIII merged commit 7302c24 into aerius:main Apr 7, 2026
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.

3 participants