capistrano-slacky 0.1.3 → 0.1.4
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e892f62e82295a36d7682081bd49b9325ca4acfb6b7567d35b3d30eee900586
|
4
|
+
data.tar.gz: b2fe16318ad7a07fe5152615b3ddaed80e5a50cf8003b3091ca8aa7a1b2d7f2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f1fafa918f99df51308081d599b96c22d97800629695ffe5f2073e8eb97df259eec2b367776b0f04f4c575350bef4f35b42212b63e6971649aba93e84377e67
|
7
|
+
data.tar.gz: 8a913baa0918ba16b2ff02ecd4db61984a850ca2b3ca41ad5516bc60988dfbe0b70f31d1d8ded6a1f901078366103a30eb744031b94141be7a868491c36d0f95
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
6
6
|
|
7
7
|
## [Unreleased]
|
8
8
|
|
9
|
+
## [0.1.4] - 2021-07-27
|
10
|
+
### Fixed
|
11
|
+
- Ensure that `:current_revision` exists during rollback. ([@chubchenko][])
|
12
|
+
|
9
13
|
## [0.1.3] - 2021-06-14
|
10
14
|
### Changed
|
11
15
|
- Update `README.md`. ([@chubchenko][])
|
@@ -40,7 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
40
44
|
- Initial version. ([@chubchenko][])
|
41
45
|
|
42
46
|
[@chubchenko]: https://github.com/chubchenko
|
43
|
-
[Unreleased]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.
|
47
|
+
[Unreleased]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.4...HEAD
|
48
|
+
[0.1.4]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.3...v0.1.4
|
44
49
|
[0.1.3]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.2...v0.1.3
|
45
50
|
[0.1.2]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.1...v0.1.2
|
46
51
|
[0.1.1]: https://github.com/chubchenko/capistrano-slacky/compare/v0.1.0...v0.1.1
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Capistrano
|
4
|
+
module Slacky
|
5
|
+
module Command
|
6
|
+
class CurrentRevision
|
7
|
+
REVISION_FILE = "REVISION"
|
8
|
+
|
9
|
+
private_constant :REVISION_FILE
|
10
|
+
|
11
|
+
def self.call
|
12
|
+
output = nil
|
13
|
+
|
14
|
+
::Capistrano::Slacky.on(within: :release) do
|
15
|
+
output = ::SSHKit::Backend.current.capture(:cat, REVISION_FILE)
|
16
|
+
end
|
17
|
+
|
18
|
+
output
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/capistrano/slacky/on.rb
CHANGED
data/lib/tasks/slacky.rake
CHANGED
@@ -7,7 +7,7 @@ namespace :slacky do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
desc "Slacky after successful rollback"
|
10
|
-
task :
|
10
|
+
task reverted: [:ensure_current_revision] do
|
11
11
|
Capistrano::Slacky::Runner.call(action: :reverted)
|
12
12
|
end
|
13
13
|
|
@@ -25,4 +25,9 @@ namespace :slacky do
|
|
25
25
|
Capistrano::Slacky::Runner.call(action: action)
|
26
26
|
end
|
27
27
|
end
|
28
|
+
|
29
|
+
desc "Ensure that the current revision is set"
|
30
|
+
task :ensure_current_revision do
|
31
|
+
set_if_empty(:current_revision) { Capistrano::Slacky::Command::CurrentRevision.call }
|
32
|
+
end
|
28
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-slacky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Chubchenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -90,6 +90,7 @@ files:
|
|
90
90
|
- lib/capistrano/slacky/block/root.rb
|
91
91
|
- lib/capistrano/slacky/block/section.rb
|
92
92
|
- lib/capistrano/slacky/command.rb
|
93
|
+
- lib/capistrano/slacky/command/current_revision.rb
|
93
94
|
- lib/capistrano/slacky/command/diff.rb
|
94
95
|
- lib/capistrano/slacky/command/duration.rb
|
95
96
|
- lib/capistrano/slacky/configuration.rb
|