Class: MSPRelease::CLI::Build
- Includes:
- Debian::Versions
- Defined in:
- lib/msp_release/cli/build.rb
Constant Summary collapse
- CLONE_DEPTH =
When cloning repositories, limit to this many commits from each head
5
Instance Method Summary collapse
Methods included from Exec::Helpers
Instance Method Details
#run ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/msp_release/cli/build.rb', line 62 def run git_url = arguments[:git_url] release_spec_arg = arguments[:branch_name] do_build = [:build] tar_it = [:tar] clone_depth = [:shallow] ? CLONE_DEPTH : nil LOG.silent if [:silent] LOG.verbose if [:verbose] LOG.noisy if [:noisy] branch_name = release_spec_arg || 'master' shallow_output = clone_depth.nil?? '' : ' (shallow)' [:shallow_output] = shallow_output # checkout project tmp_dir = "vershunt-#{Time.now.to_i}.tmp" Git.clone(git_url, {:depth => clone_depth, :out_to => tmp_dir, :branch => branch_name, :no_single_branch => true, :exec => {:quiet => true}}) project = Project.new_from_project_file(tmp_dir + "/" + Helpers::PROJECT_FILE) project.prepare_for_build(branch_name, ) if project.respond_to?(:build) project.build() else raise "I don't know how to build this project" end end |