gonative-cli 1.3.3 → 1.3.4

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: 77f0aeb4229e0af2b2ea4a4923c4e8719721fd06fffcebcdf928ff555a8709f5
4
- data.tar.gz: f99f29d065fbf8d76364bd0154bd942214a6bf7138f6e641da446b705e9873c4
3
+ metadata.gz: 94b317942c90bb00d730654df5b2b8dd2affcd57cd354fa10f8737f81c4850e4
4
+ data.tar.gz: 89df4858f9133fcf52eedea2a77cc92869ef1edd7be5477f069f2f8b26066ecf
5
5
  SHA512:
6
- metadata.gz: bf7702e3c3588a2f65145b3ad669133ae502e2af414e96cf5f924f847c0aead6222d9a5fad043ba7e55ee2c9dde31099a15e202afe312448ffcd529b4c32eb83
7
- data.tar.gz: cfce7cfd10dad1db9be77dfcb9e67bc17c304a6386229d57bf5c71576e5ad991ec1204aa818b15eed6191419b5d2e0e0a2604f2e4901c9db6621eff8aa52a204
6
+ metadata.gz: 50c202324e6a27e916e16d2dd3764d2f99b52a0b3c69a5b8372e856bf200d7131484fe67eeb080d3b9ed326c7a9aeb9f9449570394c1cf8867344dcb9cb58bb2
7
+ data.tar.gz: e0deef3dac770b7f54ded9e3b958c4adcd2df198e9b05614a6d6f8ee2412f51166836ffa966482553a41556a5007d129a1aa04922d553a0cb2ace577f0dc69a2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (1.3.3)
4
+ gonative-cli (1.3.4)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -29,12 +29,12 @@ GEM
29
29
  atomos (0.1.3)
30
30
  byebug (11.1.3)
31
31
  claide (1.1.0)
32
- cocoapods (1.14.2)
32
+ cocoapods (1.14.3)
33
33
  addressable (~> 2.8)
34
34
  claide (>= 1.0.2, < 2.0)
35
- cocoapods-core (= 1.14.2)
35
+ cocoapods-core (= 1.14.3)
36
36
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
37
- cocoapods-downloader (>= 2.0)
37
+ cocoapods-downloader (>= 2.1, < 3.0)
38
38
  cocoapods-plugins (>= 1.0.0, < 2.0)
39
39
  cocoapods-search (>= 1.0.0, < 2.0)
40
40
  cocoapods-trunk (>= 1.6.0, < 2.0)
@@ -47,7 +47,7 @@ GEM
47
47
  nap (~> 1.0)
48
48
  ruby-macho (>= 2.3.0, < 3.0)
49
49
  xcodeproj (>= 1.23.0, < 2.0)
50
- cocoapods-core (1.14.2)
50
+ cocoapods-core (1.14.3)
51
51
  activesupport (>= 5.0, < 8)
52
52
  addressable (~> 2.8)
53
53
  algoliasearch (~> 1.0)
@@ -58,7 +58,7 @@ GEM
58
58
  public_suffix (~> 4.0)
59
59
  typhoeus (~> 1.0)
60
60
  cocoapods-deintegrate (1.0.5)
61
- cocoapods-downloader (2.0)
61
+ cocoapods-downloader (2.1)
62
62
  cocoapods-plugins (1.0.0)
63
63
  nap
64
64
  cocoapods-search (1.0.1)
@@ -8,11 +8,12 @@ module GoNative
8
8
  desc 'Verify, build and release a new version'
9
9
  option :skip_build, type: :boolean, default: false
10
10
  option :debug, type: :boolean, default: false
11
+ option :use_existing_build, type: :boolean, default: false
11
12
  option :archs, default: 'x86_64,arm64'
12
13
 
13
- def call(skip_build:, debug:, archs:, **)
14
+ def call(skip_build:, debug:, archs:, use_existing_build:, **)
14
15
  Plugins::IOS::Verify.call
15
- Plugins::IOS::BuildFramework.call(archs, debug) unless skip_build
16
+ Plugins::IOS::BuildFramework.call(archs, debug, use_existing_build) unless skip_build
16
17
  Plugins::IOS::Release.call
17
18
  end
18
19
  end
@@ -14,23 +14,26 @@ module GoNative
14
14
 
15
15
  BUILD_TEMPLATE_DIRECTORY_PATH = File.expand_path(File.join(__dir__, '../../../..', 'templates', 'build', 'ios'))
16
16
 
17
- attr_reader :plugin_name, :archs, :persist_build_dir
17
+ attr_reader :plugin_name, :archs, :persist_build_dir, :use_existing_build
18
18
 
19
- def initialize(archs, persist_build_dir)
20
- podspec_file = Dir["./*.podspec"].first
21
- raise Error, "No podspec exists." unless podspec_file
19
+ def initialize(archs, persist_build_dir, use_existing_build)
20
+ podspec_file = Dir['./*.podspec'].first
21
+ raise Error, 'No podspec exists.' unless podspec_file
22
22
 
23
23
  @plugin_name = File.basename(podspec_file, '.podspec')
24
24
  @archs = archs.gsub(',', ' ')
25
25
  @persist_build_dir = persist_build_dir
26
+ @use_existing_build = use_existing_build
26
27
  end
27
28
 
28
29
  def call
29
- setup_dirs
30
- create_framework_proj
31
- move_template_files!
32
- run_pod_install
33
- chmod_frameworks_script!
30
+ cd_build_dir(!use_existing_build)
31
+ unless use_existing_build
32
+ create_framework_proj
33
+ move_template_files!
34
+ run_pod_install
35
+ chmod_frameworks_script!
36
+ end
34
37
  build_framework!
35
38
  move_framework_file
36
39
  ensure
@@ -38,16 +41,16 @@ module GoNative
38
41
  FileUtils.rm_rf('build') unless persist_build_dir
39
42
  end
40
43
 
41
- def setup_dirs
44
+ def cd_build_dir(create)
42
45
  build_dir = File.join(FileUtils.pwd, 'build')
43
- FileUtils.mkdir(build_dir)
46
+ FileUtils.mkdir(build_dir) if create
44
47
  FileUtils.cd(build_dir)
45
48
  end
46
49
 
47
50
  def create_framework_proj
48
51
  proj = Xcodeproj::Project.new(FileUtils.pwd)
49
52
  target = proj.new_target(:framework,
50
- "#{plugin_name}",
53
+ plugin_name.to_s,
51
54
  :ios,
52
55
  deployment_target)
53
56
  main_group = proj.new_group(plugin_name, plugin_name)
@@ -83,9 +86,9 @@ module GoNative
83
86
 
84
87
  def add_headers(target, group)
85
88
  headers_group = group.new_group('Headers', 'Headers')
86
- references = Dir.glob("../#{plugin_name}/Classes/**/*.h").map { |file|
89
+ references = Dir.glob("../#{plugin_name}/Classes/**/*.h").map do |file|
87
90
  headers_group.new_file("../../#{file}")
88
- }
91
+ end
89
92
  header_files = target.add_file_references(references)
90
93
  header_files << target.headers_build_phase.add_file_reference(group.new_file("../#{plugin_name}-umbrella.h"))
91
94
  header_files.each do |header|
@@ -94,9 +97,9 @@ module GoNative
94
97
  end
95
98
 
96
99
  def move_template_files!
97
- plugin_dependencies = spec.dependencies.map { |d|
100
+ plugin_dependencies = spec.dependencies.map do |d|
98
101
  ["pod '#{d.name}'", "'#{d.requirement}'"].compact.join(', ')
99
- } * "\n\t"
102
+ end * "\n\t"
100
103
  FileUtils.cp_r("#{BUILD_TEMPLATE_DIRECTORY_PATH}/.", '.')
101
104
  headers = Dir.glob("../#{plugin_name}/Classes/**/*.h").map { |f| "#import \"#{File.basename(f)}\"" } * "\n"
102
105
  Utils::TemplateInflator.new(plugin_name: plugin_name,
@@ -118,12 +121,12 @@ module GoNative
118
121
  Utils::UI.info 'Building framework'
119
122
  return if system('sh create-framework.sh >/dev/null 2>/dev/null')
120
123
 
121
- raise Error, "Error building framework. Please run the create-framework file manually to fix any errors"
124
+ raise Error, 'Error building framework. Please run the create-framework file manually to fix any errors'
122
125
  end
123
126
 
124
127
  def move_framework_file
125
128
  FileUtils.rm_rf('../XCFramework')
126
- FileUtils.mv("XCFramework", '..', force: true)
129
+ FileUtils.mv('XCFramework', '..', force: true)
127
130
  end
128
131
 
129
132
  def deployment_target
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = '1.3.3'
4
+ VERSION = '1.3.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gonative-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-16 00:00:00.000000000 Z
11
+ date: 2023-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli