lbhrr 2.34.4 → 2.35.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01e7b563f78733c7e1dbd0b063132ef5b7dbc72906e3f178a1c64b954d1a5bbd
4
- data.tar.gz: e0ba1846f5ef44ad45d47a07402453f8f4770ab1e5d8293e397df8229f27a78d
3
+ metadata.gz: 9769f0f3caa1bb6fc176e9dd1f91d03332b1dc0af926823359a120c85655a45b
4
+ data.tar.gz: 1394802e202084302003f6f84728b4b09acdb7ec32557827d3257aa27f2f1486
5
5
  SHA512:
6
- metadata.gz: 2b09358f2732877c2ca3b1b41152448cc3708748e4765b34c4633b0c4489ceac3c9ae09a2a7dd0e1c05d29abb7677770bcfac7fdffb37d22d4031ccb1804fb3a
7
- data.tar.gz: 49fd10dd7505a59933cc669d10ef8c46ecc45f6923044cc6af85bb843a7278be847d9ac81df069d2e9b7ef57a74f9708fa387adf1309bb9458b1a828512c1a48
6
+ metadata.gz: 40c0d634d96ed343960cdbac4846c9fba941b05f5eb2b4738190c847501462ed1b79a5502ab030a30f54679fbb2d0885445ffc581a44d0dcf813ca895c62ef7b
7
+ data.tar.gz: edb6bf13c274974985ad77eb5b5f9dcac51b90b26b3ca46e804c1d689b1af89d4a5d649566051bb916bfa47ad0cee1eb45e1a112af0c9c2acabc81a8fc319e9e
data/exe/lbhrr CHANGED
@@ -23,13 +23,13 @@ class LbhrrCLI < Thor
23
23
  [21,34,55][n]
24
24
  end
25
25
 
26
- def ok(url,grace: 0,skip: false)
26
+ def ok(url,grace: 1,skip: false)
27
27
 
28
28
  yield if block_given? if skip
29
29
 
30
- retries = 2
30
+ retries = 3
31
31
  sleep(grace)
32
- (0..retries).each do |i|
32
+ (1..retries).each do |i|
33
33
  uri = URI(url)
34
34
  response = Net::HTTP.get_response(uri)
35
35
 
@@ -37,7 +37,7 @@ class LbhrrCLI < Thor
37
37
  yield if block_given?
38
38
  break
39
39
  else
40
- puts "Response was not 200, it was #{response.code}., check logs gor website"
40
+ puts "Response was not 201, it was #{response.code}., check logs gor website"
41
41
  end
42
42
 
43
43
  delay = fibonacci(i)
@@ -71,14 +71,14 @@ class LbhrrCLI < Thor
71
71
 
72
72
  case focus
73
73
  when :major
74
- major += 1
75
- # Reset minor and patch to 0 when major version increments
76
- minor = 0
77
- patch = 0
74
+ major += 2
75
+ # Reset minor and patch to 1 when major version increments
76
+ minor = 1
77
+ patch = 1
78
78
  when :minor
79
- minor += 1
80
- # Reset patch to 0 when minor version increments
81
- patch = 0
79
+ minor += 2
80
+ # Reset patch to 1 when minor version increments
81
+ patch = 1
82
82
  when :patch
83
83
  patch += 1
84
84
  else
@@ -452,7 +452,6 @@ class LbhrrCLI < Thor
452
452
  assemble "next", version
453
453
  `lxc file push -rp build/#{gem} #{name}/var/gems/`
454
454
  `lxc exec #{name} -- /root/.rbenv/shims/gem install /var/gems/#{gem} --no-document`
455
- `lxc exec #{name} -- /root/.rbenv/shims/gem install /var/gems/#{gem} --no-document`
456
455
  `lxc exec #{name} -- sv restart next`
457
456
  `lxc exec #{name} -- sv restart next.ws`
458
457
 
@@ -483,7 +482,7 @@ class LbhrrCLI < Thor
483
482
  else
484
483
  `lxc exec #{name} -- bash -c 'if [ -d /var/www/app/container/rollback ]; then rm -rf /var/www/app/container/rollback; fi'`
485
484
  `lxc exec #{name} -- mv /var/www/app/container/live /var/www/app/container/rollback`
486
- `lxc exec #{name} -- cp -r /var/www/app/container/next /var/www/app/container/live`
485
+ `lxc exec #{name} -- [ -d "/var/www/app/container/next" ] && cp -r /var/www/app/container/next /var/www/app/container/live`
487
486
  `lxc exec #{name} -- sv restart live`
488
487
  `lxc exec #{name} -- sv restart ws`
489
488
  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.4"
4
+ VERSION = "2.35.0"
5
5
  end
@@ -17,17 +17,16 @@ Gem.post_install do |installer|
17
17
  destination = File.join(installer.spec.metadata.dig("destination"), env)
18
18
  src = File.expand_path(File.join(File.dirname(__FILE__), '..', 'src'))
19
19
 
20
-
21
20
  if env == "live"
22
- puts "symlink files to #{destination}"
23
- system("ln -sf #{src} #{destination}")
21
+ puts "copy files to #{destination}"
22
+ system("cp -rf #{src}/ #{destination}")
24
23
  else
25
24
  puts "copy files #{destination}"
26
25
  system("cp -rf #{src}/ #{destination}")
27
- puts "copy uploads"
28
- live = File.join(installer.spec.metadata.dig("destination"), "live")
29
- system("cp -rf #{live}/public/uploads/ #{destination}/public/uploads/")
30
- puts "uploads synced"
26
+ system " [ -d '/var/www/app/container/data/live' ] && cp -rf /var/www/app/container/data/live/*.* /var/www/app/container/data/next"
27
+ puts "data synced! - OK"
28
+ system "[ -d '/var/www/app/container/uploads/live' ] && cp -rf /var/www/app/container/uploads/live/*.* /var/www/app/container/uploads/next"
29
+ puts "uploads synced! - OK"
31
30
  end
32
31
 
33
32
  if File.exist?("#{destination}/bin/hoisted")
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.4
4
+ version: 2.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke