lbhrr 2.36.0 → 2.37.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 +19 -2
- data/lib/lbhrr/version.rb +1 -1
- data/lib/source.rb +5 -0
- data/templates/lib/rubygems_plugin.rb.erb +1 -11
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4eef3c61a2c26b9ed21dbcb220b7bad89e1a6ff319e73eb4a788dd7fdc644b7e
|
4
|
+
data.tar.gz: d5c893175d7195e35fd23b71344d34bebe3aa843299efb534f40f6d67ee8f70d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23763cabc8e0d6149b4d1dcaa5b58bfd0850363bac739a6d70144c75c28ab4b5bddf2acb2947118d0d982a6b0ed06b1a0196fb89e30b52c59fe537f8964be590
|
7
|
+
data.tar.gz: 1674ddf6156d6fd5ac91f70fbc3f3094470c9141d030839ed96b5f836c375ea2f1e079a899e91e6f8cca4655f16e6355ff1c37a591267a2db3fb2d6b185270cb
|
data/exe/lbhrr
CHANGED
@@ -6,6 +6,7 @@ require "erb"
|
|
6
6
|
require "open3"
|
7
7
|
require "io/console"
|
8
8
|
require_relative "../lib/lbhrr"
|
9
|
+
require "pathname"
|
9
10
|
|
10
11
|
class LbhrrCLI < Thor
|
11
12
|
include Thor::Actions
|
@@ -23,6 +24,10 @@ class LbhrrCLI < Thor
|
|
23
24
|
[21,34,55][n]
|
24
25
|
end
|
25
26
|
|
27
|
+
def source_path(gemname)
|
28
|
+
Pathname("/root/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/#{gemname}/src")
|
29
|
+
end
|
30
|
+
|
26
31
|
def ok(url,grace: 1,skip: false)
|
27
32
|
|
28
33
|
yield if block_given? if skip
|
@@ -301,7 +306,7 @@ class LbhrrCLI < Thor
|
|
301
306
|
end
|
302
307
|
end
|
303
308
|
|
304
|
-
|
309
|
+
|
305
310
|
|
306
311
|
end
|
307
312
|
|
@@ -415,7 +420,7 @@ class LbhrrCLI < Thor
|
|
415
420
|
if Dir.exist?("build")
|
416
421
|
FileUtils.rm_r("build")
|
417
422
|
end
|
418
|
-
|
423
|
+
|
419
424
|
config = load_configuration
|
420
425
|
|
421
426
|
msg =nil
|
@@ -452,6 +457,18 @@ class LbhrrCLI < Thor
|
|
452
457
|
assemble "next", version
|
453
458
|
`lxc file push -rp build/#{gem} #{name}/var/gems/`
|
454
459
|
`lxc exec #{name} -- /root/.rbenv/shims/gem install /var/gems/#{gem} --no-document`
|
460
|
+
|
461
|
+
src = source_path(version)
|
462
|
+
|
463
|
+
`lxc exec #{name} -- rm -rf /var/www/app/container/next/`
|
464
|
+
`lxc exec #{name} -- rsync #{src} /var/www/app/container/next/`
|
465
|
+
|
466
|
+
`lxc exec #{name} -- [ -d '/var/www/app/container/data/live' ] && cp -rf /var/www/app/container/data/live/*.* /var/www/app/container/data/next`
|
467
|
+
puts "data synced! - OK"
|
468
|
+
|
469
|
+
`lxc exec #{name} -- [ -d '/var/www/app/container/uploads/live' ] && cp -rf /var/www/app/container/uploads/live/*.* /var/www/app/container/uploads/next`
|
470
|
+
puts "uploads synced! - OK"
|
471
|
+
|
455
472
|
`lxc exec #{name} -- sv restart next`
|
456
473
|
`lxc exec #{name} -- sv restart next.ws`
|
457
474
|
|
data/lib/lbhrr/version.rb
CHANGED
data/lib/source.rb
ADDED
@@ -17,17 +17,7 @@ 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
|
-
puts "copy files to #{destination}"
|
22
|
-
system("cp -rf #{src}/ #{destination}")
|
23
|
-
else
|
24
|
-
puts "copy files #{destination}"
|
25
|
-
system("cp -rf #{src}/ #{destination}")
|
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"
|
30
|
-
end
|
20
|
+
system("cp -rf #{src}/ #{destination}")
|
31
21
|
|
32
22
|
if File.exist?("#{destination}/bin/hoisted")
|
33
23
|
system("chmod +x #{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.
|
4
|
+
version: 2.37.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delaney Kuldvee Burke
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/.kafkr/message_queue.txt
|
57
57
|
- lib/lbhrr.rb
|
58
58
|
- lib/lbhrr/version.rb
|
59
|
+
- lib/source.rb
|
59
60
|
- sig/lbhrr.rbs
|
60
61
|
- templates/lib/panamax.rb.erb
|
61
62
|
- templates/lib/rubygems_plugin.rb.erb
|