Class: Makit::Services::Builder
- Inherits:
-
Object
- Object
- Makit::Services::Builder
- Defined in:
- lib/makit/services/builder.rb
Overview
Service class responsible for build operations and make processes Handles the complex build workflow including repository setup and execution
Class Method Summary collapse
-
.ensure_gitignore ⇒ Object
Ensure .gitignore exists in the current directory.
-
.make_repository(url, commit, force: false) ⇒ Makit::V1::MakeResult
Build a repository at a specific commit.
Class Method Details
.ensure_gitignore ⇒ Object
Ensure .gitignore exists in the current directory
30 31 32 33 34 35 36 37 |
# File 'lib/makit/services/builder.rb', line 30 def ensure_gitignore return if File.exist?(".gitignore") Makit::LOGGER.info("added .gitignore file") File.open(".gitignore", "w") do |file| file.puts Makit::Content::GITIGNORE end end |
.make_repository(url, commit, force: false) ⇒ Makit::V1::MakeResult
Build a repository at a specific commit
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/makit/services/builder.rb', line 18 def make_repository(url, commit, force: false) Validator.validate_url_parameter(url) Validator.validate_commit_parameter(commit) log_filename = get_log_filename(url, commit) return load_existing_result(log_filename) if should_load_existing_result?(log_filename, force, commit) execute_make_process(url, commit, log_filename) end |