gonative-cli 1.5.6 → 1.5.7
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ccd449bdbd09a555a2f2fcd1de8684d89504b692cafcad2a01d9e84f1532ad7
|
|
4
|
+
data.tar.gz: bf7d46201af803a17fd2a749da1cb8d26288807d77b68d432d639d5f1d9a6965
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aadc0d51c984464e1fc3422b1c13a9ba625ff9ec8af88531beabddcfa767b1b3a8b2f73f9159a7c308dd6bda403cfa0494616bb51435897588931711758f1fae
|
|
7
|
+
data.tar.gz: 547160cc66fe329a2d1362bc4ff64dbd5dbbc6f3ad58f6d8994301d4d8b637d99cf49048889b7bc359c34a75b30abe8ecdc79abd18d3ada4c7f5b1ae72382763
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module GoNative
|
|
4
|
+
module Commands
|
|
5
|
+
module IOS
|
|
6
|
+
class Build < Base
|
|
7
|
+
desc 'Build a framework without releasing'
|
|
8
|
+
|
|
9
|
+
argument :podspec, required: true, desc: 'Podspec name'
|
|
10
|
+
option :debug, type: :boolean, default: false, desc: 'Keep build directory for debugging'
|
|
11
|
+
option :archs, default: 'x86_64,arm64', desc: 'Comma-separated list of architectures to build'
|
|
12
|
+
|
|
13
|
+
def call(podspec:, debug:, archs:, **)
|
|
14
|
+
Plugins::IOS::Verify.call
|
|
15
|
+
Plugins::IOS::BuildFramework.call(podspec, archs, debug)
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
data/lib/gonative/commands.rb
CHANGED
|
@@ -6,6 +6,7 @@ module GoNative
|
|
|
6
6
|
|
|
7
7
|
register 'version', Version, aliases: %w[--version -v]
|
|
8
8
|
register 'ios create', IOS::Create
|
|
9
|
+
register 'ios build', IOS::Build
|
|
9
10
|
register 'ios publish', IOS::Publish
|
|
10
11
|
register 'ios extract-extensions', IOS::ExtractExtensions
|
|
11
12
|
register 'ios embed-extensions', IOS::EmbedExtensions
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
require 'cocoapods'
|
|
4
4
|
require 'xcodeproj'
|
|
5
5
|
require 'active_support/core_ext/string/inflections'
|
|
6
|
-
require 'aws-sdk-s3'
|
|
7
6
|
|
|
8
7
|
module GoNative
|
|
9
8
|
module Plugins
|
|
@@ -29,9 +28,6 @@ module GoNative
|
|
|
29
28
|
created_build_dir = cd_build_dir
|
|
30
29
|
setup_build_dir if created_build_dir
|
|
31
30
|
build_framework!
|
|
32
|
-
move_framework_file
|
|
33
|
-
zip!
|
|
34
|
-
upload_to_s3
|
|
35
31
|
ensure
|
|
36
32
|
FileUtils.cd('..')
|
|
37
33
|
FileUtils.rm_rf('build') unless persist_build_dir
|
|
@@ -131,36 +127,6 @@ module GoNative
|
|
|
131
127
|
raise Error, 'Error building framework. Please run the create-framework file manually to fix any errors'
|
|
132
128
|
end
|
|
133
129
|
|
|
134
|
-
def move_framework_file
|
|
135
|
-
FileUtils.mv("Frameworks/#{plugin_name}.xcframework", "../#{plugin_name}/Frameworks")
|
|
136
|
-
end
|
|
137
|
-
|
|
138
|
-
def zip!
|
|
139
|
-
FileUtils.cd('..')
|
|
140
|
-
included_paths = %w[Frameworks Resources LICENSE Info.plist Classes/Dummy.swift Extensions]
|
|
141
|
-
included_paths = included_paths.map { |path| "#{plugin_name}/#{path}" }
|
|
142
|
-
system "zip -r build/#{zip_file_name} " + included_paths.join(' ')
|
|
143
|
-
FileUtils.cd('build')
|
|
144
|
-
end
|
|
145
|
-
|
|
146
|
-
def zip_file_name
|
|
147
|
-
"#{plugin_name}-v#{spec.version}.zip"
|
|
148
|
-
end
|
|
149
|
-
|
|
150
|
-
def upload_to_s3
|
|
151
|
-
s3 = Aws::S3::Client.new(
|
|
152
|
-
region: ENV['S3_REGION'],
|
|
153
|
-
access_key_id: ENV['ACCESS_KEY_ID'],
|
|
154
|
-
secret_access_key: ENV['SECRET_ACCESS_KEY']
|
|
155
|
-
)
|
|
156
|
-
|
|
157
|
-
s3.put_object(
|
|
158
|
-
bucket: ENV['S3_BUCKET'],
|
|
159
|
-
key: "#{plugin_name}/#{zip_file_name}",
|
|
160
|
-
body: File.open(zip_file_name, 'rb')
|
|
161
|
-
)
|
|
162
|
-
end
|
|
163
|
-
|
|
164
130
|
def deployment_target
|
|
165
131
|
spec.deployment_target('ios') || '15.5'
|
|
166
132
|
end
|
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require 'cocoapods'
|
|
4
|
+
require 'aws-sdk-s3'
|
|
4
5
|
|
|
5
6
|
module GoNative
|
|
6
7
|
module Plugins
|
|
7
8
|
module IOS
|
|
8
9
|
class Release
|
|
10
|
+
autoload :FileUtils, 'fileutils'
|
|
11
|
+
|
|
9
12
|
extend DSL::Serviceable
|
|
10
13
|
|
|
11
14
|
GONATIVE_SOURCE_NAME = 'gonative-specs'
|
|
12
15
|
|
|
13
|
-
attr_reader :spec, :spec_name
|
|
16
|
+
attr_reader :spec, :spec_name, :plugin_name
|
|
14
17
|
|
|
15
18
|
def initialize(spec_name)
|
|
16
19
|
@spec_name = spec_name
|
|
17
20
|
@spec = Pod::Specification.from_file(spec_name)
|
|
21
|
+
@plugin_name = File.basename(spec_name, '.podspec')
|
|
18
22
|
end
|
|
19
23
|
|
|
20
24
|
def call
|
|
21
25
|
Utils::UI.info 'Linting and releasing pod'
|
|
22
26
|
sources_manager.update(GONATIVE_SOURCE_NAME)
|
|
23
27
|
assert_not_pushed!
|
|
28
|
+
move_framework_file
|
|
29
|
+
zip!
|
|
30
|
+
upload_to_s3
|
|
24
31
|
push_to_pod_repo!
|
|
25
32
|
end
|
|
26
33
|
|
|
@@ -46,6 +53,42 @@ module GoNative
|
|
|
46
53
|
@source ||= sources_manager.source_with_name_or_url(GONATIVE_SOURCE_NAME)
|
|
47
54
|
end
|
|
48
55
|
|
|
56
|
+
def move_framework_file
|
|
57
|
+
Utils::UI.info 'Moving framework to plugin directory'
|
|
58
|
+
FileUtils.mv("build/Frameworks/#{plugin_name}.xcframework", "#{plugin_name}/Frameworks")
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
def zip!
|
|
62
|
+
Utils::UI.info 'Creating release package'
|
|
63
|
+
FileUtils.mkdir_p('build') unless File.exist?('build')
|
|
64
|
+
included_paths = %w[Frameworks Resources LICENSE Info.plist Classes/Dummy.swift Extensions]
|
|
65
|
+
included_paths = included_paths.map { |path| "#{plugin_name}/#{path}" }
|
|
66
|
+
system "zip -r build/#{zip_file_name} " + included_paths.join(' ')
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def upload_to_s3
|
|
70
|
+
Utils::UI.info 'Uploading to S3'
|
|
71
|
+
s3 = Aws::S3::Client.new(
|
|
72
|
+
region: ENV['S3_REGION'],
|
|
73
|
+
access_key_id: ENV['ACCESS_KEY_ID'],
|
|
74
|
+
secret_access_key: ENV['SECRET_ACCESS_KEY']
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
s3.put_object(
|
|
78
|
+
bucket: ENV['S3_BUCKET'],
|
|
79
|
+
key: "#{plugin_name}/#{zip_file_name}",
|
|
80
|
+
body: File.open(zip_file_path, 'rb')
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def zip_file_name
|
|
85
|
+
"#{plugin_name}-v#{spec.version}.zip"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
def zip_file_path
|
|
89
|
+
File.join('build', zip_file_name)
|
|
90
|
+
end
|
|
91
|
+
|
|
49
92
|
def sources_manager
|
|
50
93
|
Pod::Config.instance.sources_manager
|
|
51
94
|
end
|
data/lib/gonative/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gonative-cli
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.5.
|
|
4
|
+
version: 1.5.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hunaid Hassan
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: activesupport
|
|
@@ -223,6 +222,7 @@ files:
|
|
|
223
222
|
- lib/gonative/commands/base.rb
|
|
224
223
|
- lib/gonative/commands/ios/add_files.rb
|
|
225
224
|
- lib/gonative/commands/ios/add_language.rb
|
|
225
|
+
- lib/gonative/commands/ios/build.rb
|
|
226
226
|
- lib/gonative/commands/ios/create.rb
|
|
227
227
|
- lib/gonative/commands/ios/embed_extensions.rb
|
|
228
228
|
- lib/gonative/commands/ios/embed_scripts.rb
|
|
@@ -289,7 +289,6 @@ metadata:
|
|
|
289
289
|
source_code_uri: https://www.github.com/gonativeio/gonative-cli
|
|
290
290
|
changelog_uri: https://www.github.com/gonativeio/gonative-cli/blob/master/CHANGELOG.md
|
|
291
291
|
github_repo: ssh://github.com/gonativeio/gonative-cli
|
|
292
|
-
post_install_message:
|
|
293
292
|
rdoc_options: []
|
|
294
293
|
require_paths:
|
|
295
294
|
- lib
|
|
@@ -304,8 +303,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
304
303
|
- !ruby/object:Gem::Version
|
|
305
304
|
version: '0'
|
|
306
305
|
requirements: []
|
|
307
|
-
rubygems_version: 3.
|
|
308
|
-
signing_key:
|
|
306
|
+
rubygems_version: 3.7.1
|
|
309
307
|
specification_version: 4
|
|
310
308
|
summary: CLI to create gonative plugins.
|
|
311
309
|
test_files: []
|