lbhrr 2.34.3 → 2.34.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/exe/lbhrr +7 -4
  3. data/lib/lbhrr/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d030e25acdc9b942d2436836e3959b80ef95d6ac98edebe816d730b39f0983e
4
- data.tar.gz: 9f94bf53d842203d2510ce0d6980bdb88a151c5104d1f49620b983a998ef2297
3
+ metadata.gz: ef7b473c3be650316b9959eb29e941eca88f25de07524006e9d9221c6c05f0af
4
+ data.tar.gz: 0721d6ad15dc8a1b04be8861aa099394cf793449a4e0a6382d9697a885156b07
5
5
  SHA512:
6
- metadata.gz: a5577076fbb8483730409945a726595a2662be9c24e9bfd5b4bd181580580172b9804a31316effe06b31ba6b3d4ec82a3ea9a930ef3fa97ee411a77892cd54f2
7
- data.tar.gz: a6d45872055f4514ead0b97bb46713905ee3e4220607f7f37fcff7b8802f14f3f47972f8fb487e9ca3a97edb26a49415e66154bb36e774b3c89e24e088641003
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lbhrr
4
- VERSION = "2.34.3"
4
+ VERSION = "2.34.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lbhrr
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.34.3
4
+ version: 2.34.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke