lbhrr 2.34.5 → 2.36.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: beca5e85f59edc73f2961d757298f923cca445aeba9d285d40d12e145bdbd5c2
4
+ data.tar.gz: f9472aee7667f0837a61b822867d16b6e5271966c1ca0fa9ed50f12b77c59a99
5
5
  SHA512:
6
- metadata.gz: 1126d3bc7abfcf9dfe3b9d263d5f043d8223a414a3363843c8a02085d5b2e2a0a13865343b06bca191a2a5ff065de22a38b7d8b44cd44374730dcb1018a8ff3f
7
- data.tar.gz: 12b6c4d0c24342c38223ea5e765df55ba261f142fe49b706400578111038d0eb7de937c6c7d5e138794d7932b28c0a3e1384cc8796f120c2c4067a114c82add0
6
+ metadata.gz: 34d44da532f7c15df6b0b5aabc8a8d59d597b170176d3091cd70aadb622762e51aca53a6890a1d98d827a762d9b0aae1be10f52fa52201051ca8db28bb472488
7
+ data.tar.gz: 8c26fb2b6ba57ce2186be2a913ec6b3005ad09d84a909dd7f8f9c4e26ffae9ca7bee098a7dcbd61920b842216f2c2f72354926898f6249ab54306962f7c866d8
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
 
@@ -482,8 +481,8 @@ class LbhrrCLI < Thor
482
481
  puts "No deploymnt available"
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
- `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`
484
+ `lxc exec #{name} -- [ -d "/var/www/app/container/live" ] && mv /var/www/app/container/live /var/www/app/container/rollback`
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.36.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.36.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delaney Kuldvee Burke