gonative-cli 1.3.8 → 1.3.9

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: 072f9e786f31e758f24a6680f91bcec7303990eb5c78d58fd3fd54acef04d015
4
- data.tar.gz: 4bd8ae73721d0dd614cd161b3a6b86715fe5fc371a3361eb7d871a3e0b40f9e2
3
+ metadata.gz: 4a4429a1d50824e2a48f24d4a7e0f5097299712eb2deec5d36f8e9161b929f54
4
+ data.tar.gz: 9e6fc1f60b1b1ecc3bd6fa463c74657f27bc190d75c6304a0dcf3c2c04806288
5
5
  SHA512:
6
- metadata.gz: 9bdb027fe9bd03782c16012fbf596d14b6090d7ac6e0d0d42088fb29a74beedaccf46cdf041aebd56794f14c8efbfa88adbc73ef3f677f73c461c9157e7ed2d5
7
- data.tar.gz: ba970e1b131a3403231c8b8e79f31c32df160336b1b4a7c0e29afb18cc807f152a4e314c2b75684a6163cb231fdf84983662aea40a35a559929f0f837b2fac23
6
+ metadata.gz: 27c9c14b150a7af8104f8045bd09574936ca7218064c2ab4eece20e12b11ce3e0592ab033864722cf2886eb746bc101955054e2305396db33ef2378c938706ba
7
+ data.tar.gz: d1c32e059b64b1d43693080c2cb65ccc1711f211ea55246c940817ce6afbf456a664a437d81ca37400bde884fbe3bc6a786f67a8d5959f813734a03f74860190
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (1.3.7)
4
+ gonative-cli (1.3.9)
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.14.3)
32
+ cocoapods (1.15.2)
33
33
  addressable (~> 2.8)
34
34
  claide (>= 1.0.2, < 2.0)
35
- cocoapods-core (= 1.14.3)
35
+ cocoapods-core (= 1.15.2)
36
36
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
37
37
  cocoapods-downloader (>= 2.1, < 3.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.23.0, < 2.0)
50
- cocoapods-core (1.14.3)
50
+ cocoapods-core (1.15.2)
51
51
  activesupport (>= 5.0, < 8)
52
52
  addressable (~> 2.8)
53
53
  algoliasearch (~> 1.0)
@@ -69,7 +69,7 @@ GEM
69
69
  coderay (1.1.3)
70
70
  colored2 (3.1.2)
71
71
  colorize (0.8.1)
72
- concurrent-ruby (1.2.2)
72
+ concurrent-ruby (1.2.3)
73
73
  diff-lcs (1.4.4)
74
74
  dry-cli (0.7.0)
75
75
  escape (0.0.4)
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GoNative
4
+ module Commands
5
+ module Android
6
+ module Helpers
7
+ module GradleVersionReader
8
+ def gradle_file
9
+ @gradle_file ||= `find . -maxdepth 2 -iname build.gradle`.split("\n").first
10
+ end
11
+
12
+ def version
13
+ return @version if @version
14
+
15
+ str = IO.read(gradle_file)
16
+ @version = str.match(/versionName\s+"(?<version>.+)"/)[:version]
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -5,6 +5,7 @@ module GoNative
5
5
  module Android
6
6
  class Publish < Base
7
7
  desc 'Used to update one of the android internal dependencies'
8
+ include Helpers::GradleVersionReader
8
9
 
9
10
  def call
10
11
  assert_build_file_exists!
@@ -12,36 +13,19 @@ module GoNative
12
13
  end
13
14
 
14
15
  def assert_build_file_exists!
15
- return unless gradle_files.empty?
16
+ return unless gradle_file.empty?
16
17
 
17
- raise Error, "No build.gradle file exists"
18
+ raise Error, 'No build.gradle file exists'
18
19
  end
19
20
 
20
21
  private
21
22
 
22
- def gradle_files
23
- @gradle_files ||= `find . -maxdepth 2 -iname build.gradle`.split("\n")
24
- end
25
-
26
- def version
27
- return @version if @version
28
-
29
- gradle_files.each do |gradle_file|
30
- str = IO.read(gradle_file)
31
- @version = str.match(/versionName\s+\"(?<version>.+)\"/)[:version]
32
-
33
- break if @version
34
- end
35
-
36
- @version
37
- end
38
-
39
23
  def create_and_push_tag!
40
- unless system("git tag | grep #{version} > /dev/null")
41
- system "git add -A && git commit -m \"Releases #{version}.\""
42
- system "git tag #{version}"
43
- system "git push && git push --tags"
44
- end
24
+ return if system("git tag | grep #{version} > /dev/null")
25
+
26
+ system "git add -A && git commit -m \"Releases #{version}.\""
27
+ system "git tag #{version}"
28
+ system 'git push && git push --tags'
45
29
  end
46
30
  end
47
31
  end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GoNative
4
+ module Commands
5
+ module Android
6
+ class Version < Base
7
+ desc 'Used to update one of the android internal dependencies'
8
+ include Helpers::GradleVersionReader
9
+
10
+ def call
11
+ Utils::UI.output(version)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -17,5 +17,6 @@ module GoNative
17
17
 
18
18
  register 'android create', Android::Create
19
19
  register 'android publish', Android::Publish
20
+ register 'android version', Android::Version
20
21
  end
21
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = '1.3.8'
4
+ VERSION = '1.3.9'
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.8
4
+ version: 1.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
11
+ date: 2024-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -188,7 +188,9 @@ files:
188
188
  - lib/gonative.rb
189
189
  - lib/gonative/commands.rb
190
190
  - lib/gonative/commands/android/create.rb
191
+ - lib/gonative/commands/android/helpers/gradle_version_reader.rb
191
192
  - lib/gonative/commands/android/publish.rb
193
+ - lib/gonative/commands/android/version.rb
192
194
  - lib/gonative/commands/base.rb
193
195
  - lib/gonative/commands/ios/add_language.rb
194
196
  - lib/gonative/commands/ios/create.rb