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 +4 -4
- data/exe/lbhrr +13 -14
- data/lib/lbhrr/version.rb +1 -1
- data/templates/lib/rubygems_plugin.rb.erb +6 -7
- 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: beca5e85f59edc73f2961d757298f923cca445aeba9d285d40d12e145bdbd5c2
|
4
|
+
data.tar.gz: f9472aee7667f0837a61b822867d16b6e5271966c1ca0fa9ed50f12b77c59a99
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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:
|
26
|
+
def ok(url,grace: 1,skip: false)
|
27
27
|
|
28
28
|
yield if block_given? if skip
|
29
29
|
|
30
|
-
retries =
|
30
|
+
retries = 3
|
31
31
|
sleep(grace)
|
32
|
-
(
|
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
|
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 +=
|
75
|
-
# Reset minor and patch to
|
76
|
-
minor =
|
77
|
-
patch =
|
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 +=
|
80
|
-
# Reset patch to
|
81
|
-
patch =
|
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/
|
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
@@ -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 "
|
23
|
-
system("
|
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
|
-
|
28
|
-
|
29
|
-
system
|
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")
|