bake-toolkit 2.68.1 → 2.69.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: aedaaf58ee97493bdcc5a0002b571de20295c8ea013f3a45be44755931da8a2f
4
- data.tar.gz: 66f7876ca45bf0955be3dbaa58bc522f5e5fb848c15bdf527f71d9c159a4f89a
3
+ metadata.gz: 9413bb4da104f832f080c5464af7fc78d3ce84a8e2117d94f0f4e6e17a396a80
4
+ data.tar.gz: 406602ea8421c97a5ec9c35900ac32a4b6ee18350c9e345d3b732e58b4767929
5
5
  SHA512:
6
- metadata.gz: 7cc330fc24ae6454869a1dff273461784f10c4d92af7c6b144251be2606595eda7976a04772f62059963dff1ec2db4f8697eaf2e7e4a164c351e85d83e0d5b73
7
- data.tar.gz: ee9003412d36a81cff6606b19783637da7379940b241a77188c48522f569b7afd01d110384827e4956397f698ea6d74654046484214e69e60f42ed4653014045
6
+ metadata.gz: ee29f4f63153ab875442aa3290081371fdab40b6db69ff054e37ebc0bff0ee0623a29448b6e3877ed2ec9739e3c522d6bb8fe185c0e840cbbde9eb70a9848b30
7
+ data.tar.gz: 6e54abc0d3c7622f83695202eeef4abe83042b6f027b9495d0659a6a69d3965b9123a3c6c1d357126e09d3e38d0124a0dd52e69b6c359d52ad28bf93ed919cf4
data/lib/bakery/toBake.rb CHANGED
@@ -30,7 +30,7 @@ module Bake
30
30
  toBuildPattern = []
31
31
  @options.roots.each do |root|
32
32
  col.project.each do |p|
33
- projs = Root.search_to_depth(root.dir,p.name + "/Project.meta", root.depth)
33
+ projs = Root.search_to_depth(root.dir,p.name + "/Project.meta", root.depth).map { |p| Pathname.new(p).cleanpath.to_s }
34
34
  if File.basename(root.dir) == p.name && File.exist?(root.dir + "/Project.meta")
35
35
  projs << root.dir + "/Project.meta"
36
36
  end
@@ -11,6 +11,13 @@ module Bake
11
11
  @type = type
12
12
  @projectDir = projectDir
13
13
  @echo = (config.echo != "off")
14
+ if !@arg1 || @arg1.empty?
15
+ Bake.formatter.printError("Error: source of file-step must not be empty")
16
+ ExitHelper.exit(1)
17
+ elsif [:copy, :move].include?(@type) && (!@arg2 || @arg2.empty?)
18
+ Bake.formatter.printError("Error: target of file-step must not be empty")
19
+ ExitHelper.exit(1)
20
+ end
14
21
  end
15
22
 
16
23
  def run
@@ -20,13 +27,13 @@ module Bake
20
27
  FileUtils.touch(@arg1)
21
28
  elsif @type == :move
22
29
  puts "Moving #{@arg1} to #{@arg2}" if @echo
23
- FileUtils.mv(@arg1, @arg2)
30
+ Dir.glob(@arg1).each {|f| FileUtils.mv(f, @arg2)}
24
31
  elsif @type == :copy
25
32
  puts "Copying #{@arg1} to #{@arg2}" if @echo
26
- FileUtils.cp_r(@arg1, @arg2)
33
+ Dir.glob(@arg1).each {|f| FileUtils.cp_r(f, @arg2)}
27
34
  elsif @type == :remove
28
35
  puts "Removing #{@arg1}" if @echo
29
- FileUtils.rm_rf(@arg1)
36
+ Dir.glob(@arg1).each {|f| FileUtils.rm_rf(f)}
30
37
  elsif @type == :makedir
31
38
  puts "Making #{@arg1}" if @echo
32
39
  FileUtils.mkdir_p(@arg1)
data/lib/common/root.rb CHANGED
@@ -80,6 +80,7 @@ module Bake
80
80
  end
81
81
 
82
82
  def self.search_to_depth(root, baseName, depth)
83
+ return Dir.glob(baseName) if File.is_absolute?(baseName)
83
84
  if not File.exist?(root)
84
85
  Bake.formatter.printError("Root #{root} does not exist.")
85
86
  ExitHelper.exit(1)
@@ -1,7 +1,7 @@
1
1
  module Bake
2
2
  class Version
3
3
  def self.number
4
- "2.68.1"
4
+ "2.69.0"
5
5
  end
6
6
 
7
7
  def self.printBakeVersion(ry = "")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bake-toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.68.1
4
+ version: 2.69.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Schaal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-08 00:00:00.000000000 Z
11
+ date: 2021-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rtext