hu 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hu/deploy.rb +28 -25
- data/lib/hu/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d7665c684bb8184985f565feea06cdde525679d
|
4
|
+
data.tar.gz: aa59c31deb645d009d829340d3be6ec1e384652a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8169fbabe8ab3674bc0acf50085483ec3e2609f37feeb89e62875f883f916c2918fea98b471f038adfff00730067910bfddf8f08ba262d113d5e123e28d0c40
|
7
|
+
data.tar.gz: 905c34198530bd0c5bcd4c1d887b79e9cda797e1a9c38629466580da8fbccbf2eb860055508d3c63a29caf2e927af1b732bc512454c260a8e5bfd5e56d445766
|
data/lib/hu/deploy.rb
CHANGED
@@ -422,32 +422,35 @@ EOM
|
|
422
422
|
have = 0
|
423
423
|
release_rev = `git rev-parse develop`[0..7]
|
424
424
|
parser = Proc.new do |line, pid|
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
425
|
+
begin
|
426
|
+
source, line = line.chomp.split(' ', 2)[1].split(' ', 2)
|
427
|
+
source = /\[(.*)\]:/.match(source)[1]
|
428
|
+
prefix = "\e[0m"
|
429
|
+
case phase
|
430
|
+
when :init
|
431
|
+
if line =~ /Deploy #{release_rev}/
|
432
|
+
phase = :observe
|
433
|
+
end
|
434
|
+
when :observe
|
435
|
+
if line =~ /State changed from starting to crashed/
|
436
|
+
prefix = "\e[31;1m"
|
437
|
+
elsif line =~ /State changed from starting to up/
|
438
|
+
prefix = "\e[32;1m"
|
439
|
+
have += 1
|
440
|
+
end
|
441
|
+
|
442
|
+
t = Time.now.to_i - promoted_at
|
443
|
+
ts = sprintf("%02d:%02d", t / 60, t % 60)
|
444
|
+
print "\e[30;1m[\e[0;33mT+#{ts} #{prefix}#{have}\e[0m/#{prefix}#{want}\e[30;1m] \e[0m"
|
445
|
+
print "#{source}: " unless source == 'api'
|
446
|
+
print prefix + line
|
447
|
+
puts
|
448
|
+
|
449
|
+
if have >= want
|
450
|
+
Process.kill("TERM", pid)
|
451
|
+
end
|
450
452
|
end
|
453
|
+
rescue
|
451
454
|
end
|
452
455
|
end
|
453
456
|
|
data/lib/hu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- moe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07-
|
11
|
+
date: 2018-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|