capistrano-net_storage 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35f517a8f2ab7cee137f213f5d5877232ba6af5c
4
- data.tar.gz: 91078627bad46801f58f3dc5b0071c65cb45f836
3
+ metadata.gz: 9b6b794b91488406b3aed59b9670ebd91307c505
4
+ data.tar.gz: d55ffd27d570fe23544eaa2a69131f3d619aad75
5
5
  SHA512:
6
- metadata.gz: 85eba6d6781acbcafd6783f1ce0ee8c5c3d497b8483e9791b99b213397ec657219dc29d394ec415830377128613d691fb72eac1c150267706e3b62785d766a6d
7
- data.tar.gz: 8a0b154bff60805eb4981aad7db737b806d2a9985316f153a2d5d2b2ba57e04594b4495edb7fb95990c6759c586f89ae5ce66837c872963b2e38361c4d725b03
6
+ metadata.gz: 527b5c8680f32bd814dda5164643f72428820c4e72e88d77292a0b68d86d5b55899ba0bf11afc1fd82a248b7b0b58409d9f4c1a9f6216877ad80c7878d725306
7
+ data.tar.gz: dfcd53193efdbccf5e2a859f28489696d60ac84f98ceb67b9a1863c370ac5b4fa5e1bfaf6c55f58bb5ccb1079447a33b7e41297e610412c8bc74c87126851f8f
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.2.2 (2017/5/9)
2
+
3
+ Feature:
4
+
5
+ - Add a framework task `net_storage:cleanup_remote_release` to clean up old
6
+ archives on remote storage (#2)
7
+
1
8
  ## 0.2.1 (2017/4/21)
2
9
 
3
10
  Internal Change:
@@ -28,6 +28,12 @@ module Capistrano
28
28
  def download
29
29
  raise NotImplementedError
30
30
  end
31
+
32
+ # Clean up old archives on remote storage
33
+ # @abstract
34
+ # def cleanup
35
+ # raise NotImplementedError
36
+ # end
31
37
  end
32
38
  end
33
39
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module NetStorage
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  end
5
5
  end
@@ -49,20 +49,31 @@ namespace :net_storage do
49
49
  end
50
50
  after 'deploy:cleanup', 'net_storage:cleanup_local_release'
51
51
 
52
+ desc 'Clean up old archives on remote storage'
53
+ task :cleanup_remote_release do
54
+ transport = Capistrano::NetStorage.transport
55
+ next unless transport.respond_to?(:cleanup)
56
+ transport.cleanup
57
+ end
58
+ after 'net_storage:cleanup_local_release', 'net_storage:cleanup_remote_release'
59
+
52
60
  task prepare_archive: %i(net_storage:scm:update net_storage:check:bundler) do
53
61
  config = Capistrano::NetStorage.config
54
62
  Capistrano::NetStorage.scm.prepare_archive
55
63
  Capistrano::NetStorage.bundler.install unless config.skip_bundle?
56
64
  end
57
65
 
66
+ desc 'Create archive to release on local'
58
67
  task create_archive: :'net_storage:prepare_archive' do
59
68
  Capistrano::NetStorage.archiver.archive
60
69
  end
61
70
 
71
+ desc 'Upload archive onto remote storage'
62
72
  task upload_archive: :'net_storage:create_archive' do
63
73
  Capistrano::NetStorage.transport.upload
64
74
  end
65
75
 
76
+ desc 'Deploy via remote storage using uploaded archive'
66
77
  task pull_deploy: :'net_storage:transport:find_uploaded' do
67
78
  Capistrano::NetStorage.transport.download
68
79
  Capistrano::NetStorage.archiver.extract
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-net_storage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - progrhyme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-21 00:00:00.000000000 Z
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano