lbhrr 2.33.1 → 2.34.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/lbhrr +50 -41
- data/lib/lbhrr/version.rb +1 -1
- data/templates/lib/rubygems_plugin.rb.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22eaa0092cff4f232507030c50a69b181384be8e69d53fdfc65db4f0ea95c922
|
4
|
+
data.tar.gz: 8dfe8bd35bd2d6efe3b95b4d2990027d55ffa22f1b2cde3554a964058db5776c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 323c607ab08b9773741734f3bf8798df7b97614effa2f27d97ab70a25dd77942465eb496fc97dc6d78acf21a87bd9b5118c053c8d3c44dbb6c0749477eddd089
|
7
|
+
data.tar.gz: 6c94041f3051c4eb6937259bd0d3ce9397160d93536760e25d994a89b3fddee3e6b4f45ab9df8eb532146e1368df8f8536d7b256956f1ade5567dd9e0b01912b
|
data/exe/lbhrr
CHANGED
@@ -298,60 +298,63 @@ class LbhrrCLI < Thor
|
|
298
298
|
end
|
299
299
|
end
|
300
300
|
|
301
|
-
|
302
|
-
def assemble(env = "next", version = nil)
|
303
|
-
config = load_configuration
|
304
|
-
name = config["name"]
|
305
|
-
image = config["image"]
|
301
|
+
|
306
302
|
|
307
|
-
|
303
|
+
end
|
308
304
|
|
309
|
-
# Check if we're in the root directory
|
310
|
-
if manifest?
|
311
|
-
# Create the build directory if it doesn't exist
|
312
|
-
if Dir.exist?("build")
|
313
|
-
FileUtils.rm_r("build")
|
314
|
-
end
|
315
305
|
|
316
|
-
|
306
|
+
desc "assemble", "Build an application using the configuration from config/manifest.yml into a ruby gem"
|
307
|
+
def assemble(env = "next", version = nil)
|
308
|
+
config = load_configuration
|
309
|
+
name = config["name"]
|
310
|
+
image = config["image"]
|
317
311
|
|
318
|
-
|
319
|
-
Dir.glob("*").each do |item|
|
320
|
-
next if item == "build" # Skip the build directory itself
|
321
|
-
next if item == ".git" # Skip the .git directory
|
322
|
-
next if item == "tmp" # Skip the config directory
|
312
|
+
containerize
|
323
313
|
|
324
|
-
|
325
|
-
|
314
|
+
# Check if we're in the root directory
|
315
|
+
if manifest?
|
316
|
+
# Create the build directory if it doesn't exist
|
317
|
+
if Dir.exist?("build")
|
318
|
+
FileUtils.rm_r("build")
|
319
|
+
end
|
326
320
|
|
327
|
-
|
328
|
-
gem_name = config["name"]
|
329
|
-
gem_version = version.nil? ? config["version"] : version
|
321
|
+
FileUtils.mkdir_p("build/src")
|
330
322
|
|
331
|
-
|
332
|
-
|
323
|
+
# Copy all files and folders to the build directory
|
324
|
+
Dir.glob("*").each do |item|
|
325
|
+
next if item == "build" # Skip the build directory itself
|
326
|
+
next if item == ".git" # Skip the .git directory
|
327
|
+
next if item == "tmp" # Skip the config directory
|
333
328
|
|
334
|
-
|
335
|
-
|
329
|
+
FileUtils.cp_r(item, "build/src/#{item}")
|
330
|
+
end
|
336
331
|
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
"#{template_dir}/panamax.gemspec.erb" => "build/#{gem_name}.gemspec"
|
341
|
-
}
|
332
|
+
# Parameters for gemspec
|
333
|
+
gem_name = config["name"]
|
334
|
+
gem_version = version.nil? ? config["version"] : version
|
342
335
|
|
343
|
-
|
344
|
-
|
345
|
-
process_template(template, target, binding)
|
346
|
-
end
|
336
|
+
# Ensure the build directory exists
|
337
|
+
FileUtils.mkdir_p("build/lib")
|
347
338
|
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
339
|
+
# Define the template files and their target locations
|
340
|
+
template_dir = File.expand_path(File.join(File.dirname(__FILE__), "../", "templates"))
|
341
|
+
|
342
|
+
templates = {
|
343
|
+
"#{template_dir}/lib/panamax.rb.erb" => "build/lib/#{gem_name}.rb",
|
344
|
+
"#{template_dir}/lib/rubygems_plugin.rb.erb" => "build/lib/rubygems_plugin.rb",
|
345
|
+
"#{template_dir}/panamax.gemspec.erb" => "build/#{gem_name}.gemspec"
|
346
|
+
}
|
347
|
+
|
348
|
+
# Process each template
|
349
|
+
templates.each do |template, target|
|
350
|
+
process_template(template, target, binding)
|
352
351
|
end
|
353
|
-
end
|
354
352
|
|
353
|
+
`cd build && gem build #{gem_name}.gemspec`
|
354
|
+
notify_terminal("Assembled #{name}", "Lbhhr")
|
355
|
+
else
|
356
|
+
puts "config/manifest file not found. Please ensure you are in the root directory of your project."
|
357
|
+
end
|
355
358
|
end
|
356
359
|
|
357
360
|
|
@@ -402,6 +405,12 @@ class LbhrrCLI < Thor
|
|
402
405
|
method_option :patch, type: :boolean, aliases: "-pa", desc: "Increment minor version"
|
403
406
|
def hoist(name = nil)
|
404
407
|
with_error_handling do
|
408
|
+
|
409
|
+
#clean up the build directory
|
410
|
+
if Dir.exist?("build")
|
411
|
+
FileUtils.rm_r("build")
|
412
|
+
end
|
413
|
+
|
405
414
|
config = load_configuration
|
406
415
|
|
407
416
|
msg =nil
|
data/lib/lbhrr/version.rb
CHANGED
@@ -23,7 +23,7 @@ Gem.post_install do |installer|
|
|
23
23
|
system("ln -sf #{src} #{destination}")
|
24
24
|
else
|
25
25
|
puts "copy files #{destination}"
|
26
|
-
system("cp -rf #{src} #{destination}")
|
26
|
+
system("cp -rf #{src}/ #{destination}")
|
27
27
|
puts "copy uploads"
|
28
28
|
live = File.join(installer.spec.metadata.dig("destination"), "live")
|
29
29
|
system("cp -rf #{live}/public/uploads/ #{destination}/public/uploads/")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lbhrr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.34.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Delaney Kuldvee Burke
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-03-
|
11
|
+
date: 2024-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: net-ssh
|