diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-10-02 18:34:47 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2014-10-07 11:29:40 +0100 |
commit | fba7620021d32afb03cb10aa9d1ebb194721bb67 (patch) | |
tree | e0d71abb888312ad57951db7af75195afa22a60a /import/omnibus.to_lorry | |
parent | 95e699482783c93ed323d8a328ded6bd319b9903 (diff) | |
download | morph-fba7620021d32afb03cb10aa9d1ebb194721bb67.tar.gz |
import: omnibus.to_lorry improvements
Diffstat (limited to 'import/omnibus.to_lorry')
-rwxr-xr-x | import/omnibus.to_lorry | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/import/omnibus.to_lorry b/import/omnibus.to_lorry index ed2e552d..0172faad 100755 --- a/import/omnibus.to_lorry +++ b/import/omnibus.to_lorry @@ -49,9 +49,9 @@ class OmnibusLorryGenerator < Importer::Base exit 255 end - definitions_and_project, software_name = parsed_arguments - definitions_dir, _, project_name = definitions_and_project.rpartition('#') - [definitions_dir, project_name, software_name] + project_dir_and_name, software_name = parsed_arguments + project_dir, _, project_name = project_dir_and_name.rpartition('#') + [project_dir, project_name, software_name] end def generate_lorry_for_software(software) @@ -77,7 +77,19 @@ class OmnibusLorryGenerator < Importer::Base end def run - definitions_dir, project_name, software_name = parse_options(ARGV) + STDERR.puts("Current working directory: #{Dir.getwd}") + log.info("Current working directory: #{Dir.getwd}") + project_dir, project_name, software_name = parse_options(ARGV) + + log.info("Creating lorry for #{software_name} from project " + + "#{project_name}, defined in #{project_dir}") + + # Omnibus definitions are spread across multiple repos, and there is + # no stability guarantee for the definition format. The official advice + # is to use Bundler to execute Omnibus, so let's do that. + ensure_running_inside_bundler_exec(project_dir) + + STDERR.puts Omnibus.projects() project = Omnibus::Project.load(project_name) |