lib/awestruct/cli/invoker.rb in awestruct-0.4.4 vs lib/awestruct/cli/invoker.rb in awestruct-0.4.5
- old
+ new
@@ -14,20 +14,22 @@
attr_reader :options
attr_reader :config
attr_reader :profile
+ attr_reader :success
def initialize(*options)
options = options.flatten
if ( ( ! options.empty? ) && ( options.first === Awestruct::CLI::Options ) )
@options = options.first
else
@options = Awestruct::CLI::Options.parse! options
end
@threads = []
@profile = nil
+ @success = true
end
def invoke!
load_profile() unless ( options.init )
@@ -40,10 +42,11 @@
invoke_deploy() if ( options.deploy )
invoke_server() if ( options.server )
invoke_auto() if ( options.auto )
wait_for_completion()
+ success
end
def load_profile()
site_yaml_file = File.join( Dir.pwd, '_config', 'site.yml' )
if ( File.exist?( site_yaml_file ) )
@@ -88,10 +91,10 @@
FileUtils.rm_rf( File.join( config.dir, '.awestruct', 'dependency-cache' ) )
FileUtils.rm_rf( config.output_dir )
end
def invoke_generate()
- Awestruct::CLI::Generate.new( config, profile, options.base_url, 'http://localhost:4242', options.force ).run
+ @success = Awestruct::CLI::Generate.new( config, options.profile, options.base_url, 'http://localhost:4242', options.force ).run
end
def invoke_deploy()
deploy_config = profile[ 'deploy' ]