lib/docman/deployers/deployer.rb in docman-0.0.8 vs lib/docman/deployers/deployer.rb in docman-0.0.9
- old
+ new
@@ -40,10 +40,16 @@
@docroot_config.chain(@docroot_config.info_by(self['name'])).values.each do |info|
add_actions(info, info)
end
end
+ path = @docroot_config.root['full_build_path']
+ Dir.chdir path
+ if GitUtil.repo_changed? path
+ GitUtil.reset_repo path
+ end
+
stored_config_hash = read_version_file_param('config_hash')
@config_hash = Docman::Application.instance.config.config_hash
@config_yaml = Docman::Application.instance.config.to_yaml
#TODO: need to refactor
@@ -93,9 +99,11 @@
Docman::TargetChecker.create(params, self).perform
end
def read_file(path)
YAML::load_file(path)
+ rescue
+ raise "Error in config file #{path}"
end
def read_version_file_param(param)
path = File.join(@docroot_config.root['full_build_path'], 'version.yaml')
return false unless File.file?(path)
\ No newline at end of file