lib/shuttle/deploy.rb in shuttle-deploy-0.2.0.beta1 vs lib/shuttle/deploy.rb in shuttle-deploy-0.2.0.beta2
- old
+ new
@@ -1,9 +1,9 @@
module Shuttle
class Deploy
- include Shuttle::Tasks
include Shuttle::Helpers
+ include Shuttle::PathHelpers
attr_reader :ssh
attr_reader :target
attr_reader :environment
attr_reader :version
@@ -19,40 +19,8 @@
res = ssh.capture("cat #{version_path}")
@version = (res.empty? ? 1 : Integer(res) + 1).to_s
else
@version = 1
end
- end
-
- def deploy_path(path=nil)
- [target.deploy_to, path].compact.join('/')
- end
-
- def shared_path(path=nil)
- [deploy_path, 'shared', path].compact.join('/')
- end
-
- def current_path(path=nil)
- [deploy_path, 'current', path].compact.join('/')
- end
-
- def version_path
- deploy_path('version')
- end
-
- def release_path(path=nil)
- [deploy_path, 'releases', version, path].compact.join('/')
- end
-
- def scm_path
- deploy_path('scm')
- end
-
- def deploy
- setup
- update_code
- checkout_code
- link_release
- cleanup_releases
end
end
end
\ No newline at end of file