capistrano-sbt 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,7 +58,11 @@ module Capistrano
58
58
  _cset(:sbt_cleanup_settings_local, [])
59
59
  _cset(:sbt_compile_locally, false) # perform precompilation on localhost
60
60
  _cset(:sbt_goals, %w(reload clean package))
61
- _cset(:sbt_common_options, [])
61
+ _cset(:sbt_common_options) {
62
+ options = []
63
+ options << "-Dsbt.log.noformat=true" if fetch(:sbt_log_noformat, true)
64
+ options
65
+ }
62
66
  _cset(:sbt_options) {
63
67
  sbt_common_options + fetch(:sbt_extra_options, [])
64
68
  }
@@ -187,15 +191,25 @@ module Capistrano
187
191
  abort("execution failure") unless system(cmd)
188
192
  }
189
193
 
194
+ _cset(:sbt_tar, 'tar')
195
+ _cset(:sbt_tar_local, 'tar')
196
+ _cset(:sbt_target_archive) {
197
+ "#{sbt_target_path}.tar.gz"
198
+ }
199
+ _cset(:sbt_target_archive_local) {
200
+ "#{sbt_target_path_local}.tar.gz"
201
+ }
190
202
  task(:upload_locally, :roles => :app, :except => { :no_release => true }) {
191
203
  on_rollback {
192
- run("rm -rf #{sbt_target_path}")
193
- }
194
- run_locally("test -d #{sbt_target_path_local}")
195
- run("mkdir -p #{sbt_target_path}")
196
- find_servers_for_task(current_task).each { |server|
197
- run_locally("rsync -lrt --chmod=u+rwX,go+rX #{sbt_target_path_local}/ #{user}@#{server.host}:#{sbt_target_path}/")
204
+ run("rm -rf #{sbt_target_path} #{sbt_target_archive}")
198
205
  }
206
+ begin
207
+ run_locally("cd #{File.dirname(sbt_target_path_local)} && #{sbt_tar_local} chzf #{sbt_target_archive_local} #{File.basename(sbt_target_path_local)}")
208
+ upload(sbt_target_archive_local, sbt_target_archive)
209
+ run("cd #{File.dirname(sbt_target_path)} && #{sbt_tar} xzf #{sbt_target_archive} && rm -f #{sbt_target_archive}")
210
+ ensure
211
+ run_locally("rm -f #{sbt_target_archive_local}")
212
+ end
199
213
  }
200
214
  }
201
215
  }
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Sbt
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-sbt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-10 00:00:00.000000000 Z
12
+ date: 2012-08-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano