lbhrr 2.34.5 → 2.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/lbhrr +12 -13
- 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: 9769f0f3caa1bb6fc176e9dd1f91d03332b1dc0af926823359a120c85655a45b
|
|
4
|
+
data.tar.gz: 1394802e202084302003f6f84728b4b09acdb7ec32557827d3257aa27f2f1486
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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:
|
|
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
|
|
|
@@ -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/
|
|
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")
|