Sha256: d978236108a7a877bd6d160e73d62435c6dc031ffc3b89b17b7ad033c2bf09f5
Contents?: true
Size: 979 Bytes
Versions: 4
Compression:
Stored size: 979 Bytes
Contents
module Astrovan module Update # Update the application from git, then create a symlink to the current release. # # Options: # * +git+ - path to git tool. Default is 'git' def update(options = {}) shared_repository = self.shared_repository repository = self.repository release_path = self.release_path current_path = self.current_path git = options[:git] || self.git # TODO: do we need branch support, submodule config, etc? exec <<-END, options if [ -d '#{shared_repository}' ] then cd #{shared_repository} && #{git} fetch #{repository} else #{git} clone --bare #{repository} #{shared_repository} fi && #{git} clone #{shared_repository} #{release_path} END symlink release_path, options.merge(:to => current_path) yield if block_given? rescue => e # TODO: rollback # rollback raise end end end
Version data entries
4 entries across 4 versions & 1 rubygems