lbhrr 2.34.5 → 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: ef7b473c3be650316b9959eb29e941eca88f25de07524006e9d9221c6c05f0af
4
- data.tar.gz: 0721d6ad15dc8a1b04be8861aa099394cf793449a4e0a6382d9697a885156b07
3
+ metadata.gz: 9769f0f3caa1bb6fc176e9dd1f91d03332b1dc0af926823359a120c85655a45b
4
+ data.tar.gz: 1394802e202084302003f6f84728b4b09acdb7ec32557827d3257aa27f2f1486
5
5
  SHA512:
6
- metadata.gz: 1126d3bc7abfcf9dfe3b9d263d5f043d8223a414a3363843c8a02085d5b2e2a0a13865343b06bca191a2a5ff065de22a38b7d8b44cd44374730dcb1018a8ff3f
7
- data.tar.gz: 12b6c4d0c24342c38223ea5e765df55ba261f142fe49b706400578111038d0eb7de937c6c7d5e138794d7932b28c0a3e1384cc8796f120c2c4067a114c82add0
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} -- [ -d "/var/www/app/container/live" ] && 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.5"
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.5
4
+ version: 2.35.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke