gonative-cli 2.0.0 → 2.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35dc9f759236d6b1ac5b65b11b0bb90577d288cc1b160298762adab4d782ccba
4
- data.tar.gz: 4db543701fb3d94aaec48058e789ef111264dd5ce2cbba27af8e6a02f5a779e5
3
+ metadata.gz: f8fda458b90459db8f548b5e0667fb1275ea022ffd2349121811b277eb1c4527
4
+ data.tar.gz: 774342e3f46fdc0be28c8a75b2955936af10c8ab3e649608f46909d9adf8b417
5
5
  SHA512:
6
- metadata.gz: 2df712fbb8e67d33e10006997cbf6a91a9be077fcc05caed72f6a818a26f3bd6f6cf112727ce9cd7fd5423c4dc0c154c8b5e0a6d66aaf29f23222a4a3bd1a558
7
- data.tar.gz: 336b11316a7647516d16c1c5c302f0b508420682a864d45ddd9b5ba789d542e5f7799a5f6093b0f1bf7fe7c33aa743b7c289ec45b3697b854ac41bb8911f722b
6
+ metadata.gz: bcd7406d680402ed90c0c1c78d72fc216e71be442ce374da1eac03059fab6a24fdefe942a51dfeb4d6068c5e731f35547582d6550bc7e5323577a83fecf0d8d9
7
+ data.tar.gz: 3d7f76b90ae54aa7df350afa8ea5012635bd7d95e813b40c32a3805f8268db89103ca341e9852a01c258c9416f7efc41945d92e18cb0042dd49a733ca920f1f6
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (2.0.0)
4
+ gonative-cli (2.0.1)
5
5
  activesupport (~> 6.0)
6
6
  aws-sdk-s3 (~> 1)
7
7
  cocoapods (~> 1.10)
@@ -21,16 +21,16 @@ GEM
21
21
  minitest (>= 5.1)
22
22
  tzinfo (~> 2.0)
23
23
  zeitwerk (~> 2.3)
24
- addressable (2.8.7)
25
- public_suffix (>= 2.0.2, < 7.0)
24
+ addressable (2.9.0)
25
+ public_suffix (>= 2.0.2, < 8.0)
26
26
  algoliasearch (1.27.5)
27
27
  httpclient (~> 2.8, >= 2.8.3)
28
28
  json (>= 1.5.1)
29
29
  ast (2.4.2)
30
30
  atomos (0.1.3)
31
31
  aws-eventstream (1.4.0)
32
- aws-partitions (1.1231.0)
33
- aws-sdk-core (3.244.0)
32
+ aws-partitions (1.1241.0)
33
+ aws-sdk-core (3.246.0)
34
34
  aws-eventstream (~> 1, >= 1.3.0)
35
35
  aws-partitions (~> 1, >= 1.992.0)
36
36
  aws-sigv4 (~> 1.9)
@@ -41,20 +41,20 @@ GEM
41
41
  aws-sdk-kms (1.123.0)
42
42
  aws-sdk-core (~> 3, >= 3.244.0)
43
43
  aws-sigv4 (~> 1.5)
44
- aws-sdk-s3 (1.217.0)
44
+ aws-sdk-s3 (1.220.0)
45
45
  aws-sdk-core (~> 3, >= 3.244.0)
46
46
  aws-sdk-kms (~> 1)
47
47
  aws-sigv4 (~> 1.5)
48
48
  aws-sigv4 (1.12.1)
49
49
  aws-eventstream (~> 1, >= 1.0.2)
50
50
  base64 (0.3.0)
51
- bigdecimal (4.0.1)
51
+ bigdecimal (4.1.2)
52
52
  byebug (11.1.3)
53
53
  claide (1.1.0)
54
- cocoapods (1.15.2)
54
+ cocoapods (1.16.2)
55
55
  addressable (~> 2.8)
56
56
  claide (>= 1.0.2, < 2.0)
57
- cocoapods-core (= 1.15.2)
57
+ cocoapods-core (= 1.16.2)
58
58
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
59
59
  cocoapods-downloader (>= 2.1, < 3.0)
60
60
  cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -68,8 +68,8 @@ GEM
68
68
  molinillo (~> 0.8.0)
69
69
  nap (~> 1.0)
70
70
  ruby-macho (>= 2.3.0, < 3.0)
71
- xcodeproj (>= 1.23.0, < 2.0)
72
- cocoapods-core (1.15.2)
71
+ xcodeproj (>= 1.27.0, < 2.0)
72
+ cocoapods-core (1.16.2)
73
73
  activesupport (>= 5.0, < 8)
74
74
  addressable (~> 2.8)
75
75
  algoliasearch (~> 1.0)
@@ -99,7 +99,8 @@ GEM
99
99
  ethon (0.18.0)
100
100
  ffi (>= 1.15.0)
101
101
  logger
102
- ffi (1.17.2-arm64-darwin)
102
+ ffi (1.17.4-arm64-darwin)
103
+ ffi (1.17.4-x86_64-darwin)
103
104
  fourflusher (2.3.1)
104
105
  fuzzy_match (2.0.4)
105
106
  gh_inspector (1.1.3)
@@ -108,15 +109,15 @@ GEM
108
109
  i18n (1.14.8)
109
110
  concurrent-ruby (~> 1.0)
110
111
  jmespath (1.6.2)
111
- json (2.19.3)
112
+ json (2.19.4)
112
113
  logger (1.7.0)
113
114
  method_source (1.0.0)
114
- minitest (6.0.2)
115
+ minitest (6.0.5)
115
116
  drb (~> 2.0)
116
117
  prism (~> 1.5)
117
118
  molinillo (0.8.0)
118
119
  mutex_m (0.3.0)
119
- nanaimo (0.3.0)
120
+ nanaimo (0.4.0)
120
121
  nap (1.1.0)
121
122
  netrc (0.11.0)
122
123
  parallel (1.20.1)
@@ -133,7 +134,7 @@ GEM
133
134
  rainbow (3.0.0)
134
135
  rake (13.0.6)
135
136
  regexp_parser (2.1.1)
136
- rexml (3.2.5)
137
+ rexml (3.4.4)
137
138
  rspec (3.10.0)
138
139
  rspec-core (~> 3.10.0)
139
140
  rspec-expectations (~> 3.10.0)
@@ -163,18 +164,18 @@ GEM
163
164
  rubocop-ast (>= 0.4.0)
164
165
  ruby-macho (2.5.1)
165
166
  ruby-progressbar (1.11.0)
166
- typhoeus (1.4.1)
167
- ethon (>= 0.9.0)
167
+ typhoeus (1.6.0)
168
+ ethon (>= 0.18.0)
168
169
  tzinfo (2.0.6)
169
170
  concurrent-ruby (~> 1.0)
170
171
  unicode-display_width (2.0.0)
171
- xcodeproj (1.24.0)
172
+ xcodeproj (1.27.0)
172
173
  CFPropertyList (>= 2.3.3, < 4.0)
173
174
  atomos (~> 0.1.3)
174
175
  claide (>= 1.0.2, < 2.0)
175
176
  colored2 (~> 3.1)
176
- nanaimo (~> 0.3.0)
177
- rexml (~> 3.2.4)
177
+ nanaimo (~> 0.4.0)
178
+ rexml (>= 3.3.6, < 4.0)
178
179
  zeitwerk (2.7.5)
179
180
 
180
181
  PLATFORMS
@@ -171,9 +171,18 @@ module GoNative
171
171
  ]
172
172
  )
173
173
 
174
+ command << "MARKETING_VERSION=#{Shellwords.escape(marketing_version)}" if marketing_version
175
+
174
176
  command.join(" ")
175
177
  end
176
178
 
179
+ def marketing_version
180
+ @marketing_version ||= begin
181
+ version_file = File.join(project_root, 'VERSION')
182
+ File.read(version_file).strip if File.exist?(version_file)
183
+ end
184
+ end
185
+
177
186
  def tuist_workspace_path
178
187
  "#{plugin_name}.xcworkspace"
179
188
  end
@@ -25,6 +25,7 @@ module GoNative
25
25
 
26
26
  def call
27
27
  assert_not_published!
28
+ sign_frameworks!
28
29
  zip_frameworks!
29
30
  upload_frameworks!
30
31
  publish_to_registry!
@@ -60,6 +61,57 @@ module GoNative
60
61
  raise Error, "#{plugin_name} #{version} has already been published to the registry"
61
62
  end
62
63
 
64
+ def sign_frameworks!
65
+ identity = codesign_identity
66
+ unless identity
67
+ Utils::UI.warning 'No codesign identity found. Set CODESIGN_IDENTITY or ensure a valid identity is in your keychain. Skipping framework signing.'
68
+ return
69
+ end
70
+
71
+ Utils::UI.info "Signing frameworks with identity: #{identity}"
72
+
73
+ Dir.glob(File.join(frameworks_dir, '*.xcframework')).each do |xcframework_path|
74
+ Dir.glob(File.join(xcframework_path, '**', '*.framework')).each do |framework_path|
75
+ Utils::UI.info "Signing #{File.basename(framework_path)}"
76
+ sign_command = [
77
+ 'codesign',
78
+ '--sign', Shellwords.escape(identity),
79
+ '--timestamp',
80
+ '--force',
81
+ Shellwords.escape(framework_path)
82
+ ].join(' ')
83
+
84
+ system(sign_command) or
85
+ raise Error, "Failed to sign #{framework_path}"
86
+ end
87
+ end
88
+ end
89
+
90
+ def codesign_identity
91
+ @codesign_identity ||= ENV.fetch('CODESIGN_IDENTITY') do
92
+ output = `security find-identity -v -p codesigning 2>/dev/null`
93
+ match = output.match(/^\s*\d+\)\s+\S+\s+"([^"]+)"/)
94
+ match[1] if match
95
+ end
96
+ end
97
+
98
+ alias signing_identity codesign_identity
99
+
100
+ def registry_signing_options
101
+ key_path = ENV['SPM_SIGNING_KEY_PATH']
102
+ cert_path = ENV['SPM_SIGNING_CERT_PATH']
103
+
104
+ if key_path && cert_path
105
+ return " --private-key-path #{Shellwords.escape(key_path)}" \
106
+ " --cert-chain-paths #{Shellwords.escape(cert_path)}"
107
+ end
108
+
109
+ identity = signing_identity
110
+ return " --signing-identity #{Shellwords.escape(identity)}" if identity
111
+
112
+ ''
113
+ end
114
+
63
115
  def frameworks_dir
64
116
  File.join(project_root, 'Frameworks')
65
117
  end
@@ -176,9 +228,11 @@ module GoNative
176
228
  # Update the staged Package.swift with real URLs and checksums
177
229
  update_package_swift!(staging_dir)
178
230
 
231
+ signing_opts = registry_signing_options
232
+
179
233
  FileUtils.cd(staging_dir) do
180
234
  system "swift package-registry publish #{package_identity} #{version}" \
181
- " --registry-url #{registry_url}" or
235
+ " --registry-url #{registry_url}#{signing_opts}" or
182
236
  raise Error, 'Failed to publish to SPM registry'
183
237
  end
184
238
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = '2.0.0'
4
+ VERSION = '2.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gonative-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan