daemontools 0.2.5 → 0.2.6
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 +4 -4
- data/bin/daemontools-gen +13 -4
- data/lib/daemontools/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5703423d017dfd15356942bfb9c15b1bf90a0066e0ee3cb44d6465c0028a926
|
4
|
+
data.tar.gz: f7cb58a362f20b50c777a935b9468d7ca290b6d1f9c655321dc37d0b3103b069
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 990027123b11e7049fe904a19ac9fe30ae0fdbd6823a61d3640d0e9506f95daec95d6d7fa09878ef18d8fcf89a1d5682aec99591eb35e6134a16a4901cdfd27c
|
7
|
+
data.tar.gz: 5d668f9a9bcd887332110e549e738a29bbfcce6e696cf45c57fa27545d5d54a3d2f91116562cefdeb81dc26d349b423ae1fd69e4688a4a23caf1510d2a9343b0
|
data/bin/daemontools-gen
CHANGED
@@ -10,13 +10,22 @@ puts "Building svc services for roles #{roles} .."
|
|
10
10
|
old_path = ARGV[2] || ''
|
11
11
|
new_path = ARGV[3] || ''
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
def need_remove_old_services?(old_path, new_path)
|
14
|
+
# If no new path there is no reason to try remove old services
|
15
|
+
return false if new_path.nil? || new_path.empty?
|
16
|
+
# If no old path there is no reason to try remove old services
|
17
|
+
return false if old_path.nil? || old_path.empty?
|
18
|
+
# Check if config files are exists
|
19
|
+
File.exist?("#{old_path}/config/services.rb") && File.exist?("#{new_path}/config/services.rb")
|
20
|
+
end
|
21
|
+
|
22
|
+
if need_remove_old_services?(old_path, new_path)
|
17
23
|
previous_builder = Daemontools::Builder.new("#{old_path}/config/services.rb")
|
18
24
|
current_builder = Daemontools::Builder.new("#{new_path}/config/services.rb")
|
19
25
|
remover = Daemontools::Remover.new(roles, previous_builder, current_builder)
|
20
26
|
remover.remove_unused_services
|
21
27
|
current_builder.gen(roles, environment)
|
28
|
+
else
|
29
|
+
builder = Daemontools::Builder.new("#{Dir.pwd}/config/services.rb")
|
30
|
+
builder.gen(roles, environment)
|
22
31
|
end
|
data/lib/daemontools/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daemontools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|