Class: Canvas::Workflow::CLI::Build

Inherits:
Thor
  • Object
show all
Defined in:
lib/canvas/workflow/cli/build.rb

Instance Method Summary collapse

Instance Method Details

#buildObject

Raises:



9
10
11
12
13
14
15
16
17
18
# File 'lib/canvas/workflow/cli/build.rb', line 9

def build
  config = File.expand_path("../../../../../_config.yml", __FILE__)

  cmd = ""
  cmd << "bundle exec " if options[:with_bundler]
  cmd << "jekyll build --config #{config},_config.yml --verbose"
  #puts "#{cmd}"
  ret = system("#{cmd}")
  raise Error.new($?.exitstatus) if (ret.nil? || ret == false)
end