lbhrr 2.34.3 → 2.34.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/lbhrr +7 -4
- data/lib/lbhrr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef7b473c3be650316b9959eb29e941eca88f25de07524006e9d9221c6c05f0af
|
4
|
+
data.tar.gz: 0721d6ad15dc8a1b04be8861aa099394cf793449a4e0a6382d9697a885156b07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1126d3bc7abfcf9dfe3b9d263d5f043d8223a414a3363843c8a02085d5b2e2a0a13865343b06bca191a2a5ff065de22a38b7d8b44cd44374730dcb1018a8ff3f
|
7
|
+
data.tar.gz: 12b6c4d0c24342c38223ea5e765df55ba261f142fe49b706400578111038d0eb7de937c6c7d5e138794d7932b28c0a3e1384cc8796f120c2c4067a114c82add0
|
data/exe/lbhrr
CHANGED
@@ -23,7 +23,10 @@ class LbhrrCLI < Thor
|
|
23
23
|
[21,34,55][n]
|
24
24
|
end
|
25
25
|
|
26
|
-
def ok(url,grace: 0)
|
26
|
+
def ok(url,grace: 0,skip: false)
|
27
|
+
|
28
|
+
yield if block_given? if skip
|
29
|
+
|
27
30
|
retries = 2
|
28
31
|
sleep(grace)
|
29
32
|
(0..retries).each do |i|
|
@@ -397,6 +400,7 @@ class LbhrrCLI < Thor
|
|
397
400
|
|
398
401
|
desc "hoist", "Deploy an application using the configuration from config/manifest.yml to next"
|
399
402
|
method_option :current, type: :boolean, aliases: "-c", desc: "curret version"
|
403
|
+
method_option :skipok, type: :boolean, aliases: "-so", desc: "curret version"
|
400
404
|
method_option :major, type: :boolean, aliases: "-ma", desc: "Increment major version"
|
401
405
|
method_option :msg, type: :boolean, aliases: "-msg", desc: "set the commit message"
|
402
406
|
method_option :minor, type: :boolean, aliases: "-mi", desc: "Increment minor version"
|
@@ -436,7 +440,6 @@ class LbhrrCLI < Thor
|
|
436
440
|
|
437
441
|
if options[:current]
|
438
442
|
version = config['version']
|
439
|
-
puts "re hoist #{version}"
|
440
443
|
end
|
441
444
|
|
442
445
|
modify_manifest do |config|
|
@@ -462,7 +465,7 @@ class LbhrrCLI < Thor
|
|
462
465
|
change = "RELEASE #{version}"
|
463
466
|
commit("#{change}\n\n#{msg}\n\n Hoisted #{name} version #{version}")
|
464
467
|
|
465
|
-
ok("https://next.#{config['host']}/ok",grace: 25) do
|
468
|
+
ok("https://next.#{config['host']}/ok",grace: 25,skip:options[:skipok]) do
|
466
469
|
notify_terminal(" #{name} version #{version} is up on next!", "Lbhhr")
|
467
470
|
end
|
468
471
|
end
|
@@ -480,7 +483,7 @@ class LbhrrCLI < Thor
|
|
480
483
|
else
|
481
484
|
`lxc exec #{name} -- bash -c 'if [ -d /var/www/app/container/rollback ]; then rm -rf /var/www/app/container/rollback; fi'`
|
482
485
|
`lxc exec #{name} -- mv /var/www/app/container/live /var/www/app/container/rollback`
|
483
|
-
`lxc exec #{name} -- cp -r /var/www/app/container/next /var/www/app/container/live`
|
486
|
+
`lxc exec #{name} -- [ -d "/var/www/app/container/live" ] && cp -r /var/www/app/container/next /var/www/app/container/live`
|
484
487
|
`lxc exec #{name} -- sv restart live`
|
485
488
|
`lxc exec #{name} -- sv restart ws`
|
486
489
|
modify_manifest do |config|
|
data/lib/lbhrr/version.rb
CHANGED