gonative-cli 1.2.0 → 1.2.1

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: 696be1b5e8b71bb4605450974d039505571a2dd5ab57635c3bf9e76673ac7847
4
- data.tar.gz: 460e006f8a03e7f557e7dd0ea8f6fc4fb0c981c6e078b5eaf8fd33d1e040e4d4
3
+ metadata.gz: de98ab993a8962f18682d81561ffe9955b5820abb4ca6be4f3e07624d203aea2
4
+ data.tar.gz: b374cefeca6c9329b4f3d531b6a0a331e6fa61edd25b66c19f1ed9d8deb6a36a
5
5
  SHA512:
6
- metadata.gz: c0088b9718dddb755e9cb8994a5bb80a3b07168938dbf2b604bcc3b1d96d6c721b77060c19a7b4916d4f30cbc6782ce5fbeecc00e1ab73b1c6df24dc77901e2e
7
- data.tar.gz: 5d69260b7d62293d491bfcc8decac1cc6ddf6c9995dd1f3a54328c72d79ed2b5f6899ebc3b85110eac6e9da2b1965e86f0d8fcc90b211166fcf25d539222d41e
6
+ metadata.gz: ea85323ef9fea3dbbc95d614ac78b04e8c14dbedc5591dbe5af703478377f892e3ede539a3087287065afb9fc95106ca06df86f2850835172f623b40681c0d53
7
+ data.tar.gz: 32bb8a22a19dc8d60bdb708c5f351c4a81821faa21748f6caec2049e905c5256dff801b5fc49f0c6feb1a0db9dee14542a6e9f55c58b42a9e3f0b3b796cd4713
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (1.2.0)
4
+ gonative-cli (1.2.1)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -29,10 +29,10 @@ GEM
29
29
  atomos (0.1.3)
30
30
  byebug (11.1.3)
31
31
  claide (1.1.0)
32
- cocoapods (1.12.0)
32
+ cocoapods (1.12.1)
33
33
  addressable (~> 2.8)
34
34
  claide (>= 1.0.2, < 2.0)
35
- cocoapods-core (= 1.12.0)
35
+ cocoapods-core (= 1.12.1)
36
36
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
37
37
  cocoapods-downloader (>= 1.6.0, < 2.0)
38
38
  cocoapods-plugins (>= 1.0.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.21.0, < 2.0)
50
- cocoapods-core (1.12.0)
50
+ cocoapods-core (1.12.1)
51
51
  activesupport (>= 5.0, < 8)
52
52
  addressable (~> 2.8)
53
53
  algoliasearch (~> 1.0)
@@ -144,7 +144,7 @@ GEM
144
144
  colored2 (~> 3.1)
145
145
  nanaimo (~> 0.3.0)
146
146
  rexml (~> 3.2.4)
147
- zeitwerk (2.6.7)
147
+ zeitwerk (2.6.8)
148
148
 
149
149
  PLATFORMS
150
150
  arm64-darwin-21
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GoNative
4
+ module Commands
5
+ module IOS
6
+ class Version < Base
7
+ desc 'Rename an iOS project'
8
+
9
+ def call
10
+ Plugins::IOS::Version.call
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -11,6 +11,7 @@ module GoNative
11
11
  register 'ios embed-extensions', IOS::EmbedExtensions
12
12
  register 'ios set-bundle-id', IOS::SetBundleId
13
13
  register 'ios rename', IOS::Rename
14
+ register 'ios version', IOS::Version
14
15
 
15
16
  register 'android create', Android::Create
16
17
  register 'android publish', Android::Publish
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'cocoapods'
4
+
5
+ module GoNative
6
+ module Plugins
7
+ module IOS
8
+ module Helpers
9
+ module SpecReader
10
+ def spec_name
11
+ @spec_name ||= Dir.entries('.').select { |s| s.end_with? '.podspec' }.first
12
+ end
13
+
14
+ def spec
15
+ @spec ||= Pod::Specification.from_file(spec_name)
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GoNative
4
+ module Plugins
5
+ module IOS
6
+ module Helpers
7
+ end
8
+ end
9
+ end
10
+ end
@@ -7,8 +7,9 @@ module GoNative
7
7
  module IOS
8
8
  class Release
9
9
  extend DSL::Serviceable
10
+ include Helpers::SpecReader
10
11
 
11
- GONATIVE_SOURCE_NAME = 'gonative-specs'.freeze
12
+ GONATIVE_SOURCE_NAME = 'gonative-specs'
12
13
 
13
14
  def call
14
15
  Utils::UI.info 'Linting and releasing pod'
@@ -24,7 +25,7 @@ module GoNative
24
25
  def assert_spec_exists!
25
26
  return if spec_name
26
27
 
27
- raise Error, "No podspec file exists"
28
+ raise Error, 'No podspec file exists'
28
29
  end
29
30
 
30
31
  def assert_not_pushed!
@@ -33,30 +34,24 @@ module GoNative
33
34
 
34
35
  pushed_versions = source.versions(name)&.collect(&:to_s)
35
36
 
36
- raise Error,
37
- "#{name} (#{version}) has already been pushed to #{source.name}" if pushed_versions&.include? version.to_s
37
+ if pushed_versions&.include? version.to_s
38
+ raise Error,
39
+ "#{name} (#{version}) has already been pushed to #{source.name}"
40
+ end
38
41
  end
39
42
 
40
43
  def create_and_push_tag!
41
- unless system("git tag | grep #{spec.version} > /dev/null")
42
- system "git add -A && git commit -m \"Releases #{spec.version}.\""
43
- system "git tag #{spec.version}"
44
- system "git push && git push --tags"
45
- end
44
+ return if system("git tag | grep #{spec.version} > /dev/null")
45
+
46
+ system "git add -A && git commit -m \"Releases #{spec.version}.\""
47
+ system "git tag #{spec.version}"
48
+ system 'git push && git push --tags'
46
49
  end
47
50
 
48
51
  def push_to_pod_repo!
49
52
  system "pod repo push #{GONATIVE_SOURCE_NAME} #{spec_name} --private --allow-warnings"
50
53
  end
51
54
 
52
- def spec_name
53
- @spec_name ||= Dir.entries(".").select { |s| s.end_with? ".podspec" }.first
54
- end
55
-
56
- def spec
57
- @spec ||= Pod::Specification.from_file(spec_name)
58
- end
59
-
60
55
  def source
61
56
  @source ||= sources_manager.source_with_name_or_url(GONATIVE_SOURCE_NAME)
62
57
  end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'cocoapods'
4
+
5
+ module GoNative
6
+ module Plugins
7
+ module IOS
8
+ class Version
9
+ extend DSL::Serviceable
10
+ include Helpers::SpecReader
11
+
12
+ def call
13
+ Utils::UI.output(spec.version)
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -9,6 +9,10 @@ module GoNative
9
9
  def info(msg)
10
10
  puts msg.colorize(:green)
11
11
  end
12
+
13
+ def output(msg)
14
+ puts msg
15
+ end
12
16
  end
13
17
  end
14
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.1'
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.2.0
4
+ version: 1.2.1
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-04-18 00:00:00.000000000 Z
11
+ date: 2023-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -196,6 +196,7 @@ files:
196
196
  - lib/gonative/commands/ios/publish.rb
197
197
  - lib/gonative/commands/ios/rename.rb
198
198
  - lib/gonative/commands/ios/set_bundle_id.rb
199
+ - lib/gonative/commands/ios/version.rb
199
200
  - lib/gonative/commands/version.rb
200
201
  - lib/gonative/dsl/error_catchable.rb
201
202
  - lib/gonative/dsl/serviceable.rb
@@ -204,10 +205,13 @@ files:
204
205
  - lib/gonative/plugins/ios/create.rb
205
206
  - lib/gonative/plugins/ios/embed_extensions.rb
206
207
  - lib/gonative/plugins/ios/extract_extensions.rb
208
+ - lib/gonative/plugins/ios/helpers.rb
209
+ - lib/gonative/plugins/ios/helpers/spec_reader.rb
207
210
  - lib/gonative/plugins/ios/release.rb
208
211
  - lib/gonative/plugins/ios/rename.rb
209
212
  - lib/gonative/plugins/ios/set_bundle_id.rb
210
213
  - lib/gonative/plugins/ios/verify.rb
214
+ - lib/gonative/plugins/ios/version.rb
211
215
  - lib/gonative/utils.rb
212
216
  - lib/gonative/utils/content_evaluator.rb
213
217
  - lib/gonative/utils/sanitize_plugin_name.rb