pod-builder 5.1.5 → 5.2.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: f4933e55a3964f7ac116ee774b3ba1b5e576f58e3ac75c47154c9ec9dc5b3796
4
- data.tar.gz: 8123dd9ddda019f7bb1701e36400d369e44728df85315f40c2ddffaf4a9a6d1f
3
+ metadata.gz: 2a195ea19893b53adf9bffdd392dfc0c71b96448ba87f9431e91350f5aaf928a
4
+ data.tar.gz: 2ab6e876ef84047c0c813025eef5681643ddc64fe3a79b96e2e732732646a945
5
5
  SHA512:
6
- metadata.gz: 247d0d6e6ee175425d37cb98fe73b899deaaae483d1fbc1f39f26182ff5bb9667ff6ace2605ae558fd3eea3eca9969e4eb83e171ed6ce0e20b702c65d995fa4d
7
- data.tar.gz: 61020f110c8c329de3bc5c2c67442ecbc6fd826186ebe6552db6c56c5ec3c00e992e0a0320bfc813185f631c096b48b4f0259b28b26b827b56e7ca705a734184
6
+ metadata.gz: 2a8cb5a1d34c4991308160ec49483eefa0f731b3af7894429d41580da2b20b49ca0c8513e1a9ba8ee293f67ff316f83e93b273bf57754b4107294283bc7e1499
7
+ data.tar.gz: 640ec2216ddf0d6e880e14589b4bed129a86203b05a291f242dd12ed1ccde4a7e7d98a68b00e3a6eb7ddc46abdf830f8f1ee450597f16d6d3c1a1732286b6e42
@@ -1,4 +1,4 @@
1
- require 'json'
1
+ require "json"
2
2
 
3
3
  module PodBuilder
4
4
  class Info
@@ -7,57 +7,57 @@ module PodBuilder
7
7
  result = {}
8
8
  name = nil
9
9
 
10
- Dir.glob(PodBuilder::prebuiltpath("**/#{Configuration.prebuilt_info_filename}")).each do |json_path|
10
+ Dir.glob(PodBuilder::prebuiltpath("**/#{Configuration.prebuilt_info_filename}")).each do |json_path|
11
11
  name, prebuilt_info = prebuilt_info(json_path)
12
12
  result[name] = prebuilt_info
13
13
  end
14
14
 
15
15
  return result
16
16
  end
17
-
17
+
18
18
  private
19
19
 
20
20
  def self.pod_name_from_entry(line)
21
21
  if (matches = line&.match(/pod '(.*?)'/)) && matches.size == 2
22
22
  pod_name = matches[1]
23
-
23
+
24
24
  return pod_name
25
25
  end
26
26
 
27
27
  return "unknown_podname"
28
28
  end
29
-
29
+
30
30
  def self.version_info_from_entry(line)
31
31
  if (matches = line&.match(/pod '(.*)', '=(.*)'/)) && matches.size == 3
32
32
  pod_name = matches[1]
33
33
  tag = matches[2]
34
-
34
+
35
35
  return { "tag": tag }
36
36
  elsif (matches = line&.match(/pod '(.*)', :git => '(.*)', :commit => '(.*)'/)) && matches.size == 4
37
37
  pod_name = matches[1]
38
38
  repo = matches[2]
39
39
  hash = matches[3]
40
-
40
+
41
41
  return { "repo": repo, "hash": hash }
42
42
  elsif (matches = line&.match(/pod '(.*)', :git => '(.*)', :branch => '(.*)'/)) && matches.size == 4
43
43
  pod_name = matches[1]
44
44
  repo = matches[2]
45
45
  branch = matches[3]
46
-
46
+
47
47
  return { "repo": repo, "branch": branch }
48
48
  elsif (matches = line&.match(/pod '(.*)', :git => '(.*)', :tag => '(.*)'/)) && matches.size == 4
49
49
  pod_name = matches[1]
50
50
  repo = matches[2]
51
51
  tag = matches[3]
52
-
52
+
53
53
  return { "repo": repo, "tag": tag }
54
54
  elsif (matches = line&.match(/pod '(.*)', :path => '(.*)'/)) && matches.size == 3
55
55
  pod_name = matches[1]
56
-
56
+
57
57
  return { "repo": "local" }
58
58
  elsif (matches = line&.match(/pod '(.*)', :podspec => '(.*)'/)) && matches.size == 3
59
59
  pod_name = matches[1]
60
-
60
+
61
61
  return { "repo": "local" }
62
62
  else
63
63
  raise "\n\nFailed extracting version from line:\n#{line}\n".red
@@ -70,21 +70,22 @@ module PodBuilder
70
70
  end
71
71
 
72
72
  data = JSON.load(File.read(path))
73
-
73
+
74
74
  result = {}
75
75
  if swift_version = data["swift_version"]
76
- result.merge!({ "swift_version": swift_version})
76
+ result.merge!({ "swift_version": swift_version })
77
77
  end
78
-
78
+
79
79
  pod_version = version_info_from_entry(data["entry"])
80
80
  pod_name = pod_name_from_entry(data["entry"])
81
81
 
82
82
  result.merge!({ "version": pod_version })
83
83
  result.merge!({ "specs": (data["specs"] || []) })
84
84
  result.merge!({ "is_static": (data["is_static"] || false) })
85
+ result.merge!({ "pb_version": (data["pb_version"] || "0.0.0") })
85
86
  result.merge!({ "original_compile_path": (data["original_compile_path"] || "") })
86
-
87
+
87
88
  return pod_name, result
88
- end
89
+ end
89
90
  end
90
- end
91
+ end
@@ -70,7 +70,7 @@ module PodBuilder
70
70
 
71
71
  copy_prebuilt_items(podfile_items - prebuilt_entries)
72
72
 
73
- prebuilt_info = prebuilt_info(podfile_items)
73
+ prebuilt_info = prebuilt_info(podfile_items, argument_pods)
74
74
  licenses = license_specifiers()
75
75
 
76
76
  if !OPTIONS.has_key?(:debug)
@@ -99,7 +99,7 @@ module PodBuilder
99
99
  end
100
100
  end
101
101
 
102
- def self.prebuilt_info(podfile_items)
102
+ def self.prebuilt_info(podfile_items, argument_pods)
103
103
  gitignored_files = PodBuilder::gitignoredfiles
104
104
 
105
105
  swift_version = PodBuilder::system_swift_version
@@ -138,6 +138,9 @@ module PodBuilder
138
138
  if hash = build_folder_hash(podfile_item, gitignored_files)
139
139
  data["build_folder_hash"] = hash
140
140
  end
141
+ if argument_pods.include?(podfile_item.root_name)
142
+ data["pb_version"] = PodBuilder::VERSION
143
+ end
141
144
 
142
145
  ret.merge!({ podbuilder_file => data })
143
146
  end
@@ -111,12 +111,12 @@ module PodBuilder
111
111
  to = "./" + Pathname.new(to).relative_path_from(Pathname.new(git_rootpath)).to_s
112
112
 
113
113
  if from.start_with?("/tmp")
114
- other_swift_flags_override += " -coverage-prefix-map \"/private#{from}\"=\"#{to}\""
115
- other_c_flags_override += " -fcoverage-prefix-map=\"/private#{from}\"=\"#{to}\""
114
+ other_swift_flags_override += " -coverage-prefix-map \"/private#{from}/\"=\"#{to}/\""
115
+ other_c_flags_override += " -fcoverage-prefix-map=\"/private#{from}/\"=\"#{to}/\""
116
+ else
117
+ other_swift_flags_override += " -coverage-prefix-map \"#{from}/\"=\"#{to}/\""
118
+ other_c_flags_override += " -fcoverage-prefix-map=\"#{from}/\"=\"#{to}/\""
116
119
  end
117
-
118
- other_swift_flags_override += " -coverage-prefix-map \"#{from}\"=\"#{to}\""
119
- other_c_flags_override += " -fcoverage-prefix-map=\"#{from}\"=\"#{to}\""
120
120
  end
121
121
  end
122
122
 
@@ -1,3 +1,3 @@
1
1
  module PodBuilder
2
- VERSION = "5.1.5"
2
+ VERSION = "5.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pod-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.5
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Camin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-19 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler