gonative-cli 1.0.1 → 1.0.2

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: 0b7a1b125d1ffe1178c8aac7ce7a83f28763f56a4143927ea5f98af65a6e8b0d
4
- data.tar.gz: 5e3d40a22098d80e8a81caf9f09238103beac627fadfc60fbfec32ba7787baee
3
+ metadata.gz: 1175d98308d5e73c597c0040992a2709b6d166f31b35d5572352137bc96ea676
4
+ data.tar.gz: cb80b1dfade0a4552002221dab305ab015862d10d9dcd562b83bb1c369d17116
5
5
  SHA512:
6
- metadata.gz: c957a26340165e854405d1d8d29501396abb32cdae937f18ad49679630b266034f0389a073061f46b78549e472b5eaaa5145d262842ec2b5de4713a087f30eba
7
- data.tar.gz: cbeb838d856380b958636c938596419ee3b94594ca8a61ee9f081e3990ab26cbd429be34423835888bd56d535050b3a85aa579e902d367fbf1d4515655c39b18
6
+ metadata.gz: d542f21f7caa384edbcb4026ed122cfe11c2dc4b823a0b794e9916dd01fb32b796a8031a9524f5853930bbd6e7ed770e48198103263f86a9b2c1f3634d83c19e
7
+ data.tar.gz: 17e6fc4acfa10fd569c7f3dd970f346bfeee2c28419c0faf7f45c86405719b2244d9ebc7c4c45f587912ec0f021b80e1b59b8003083b0d1d45e4370381d78d01
@@ -12,22 +12,26 @@ module GoNative
12
12
  end
13
13
 
14
14
  def assert_build_file_exists!
15
- return if gradle_file
15
+ return if gradle_files.empty?
16
16
 
17
17
  raise Error, "No build.gradle file exists"
18
18
  end
19
19
 
20
20
  private
21
21
 
22
- def gradle_file
23
- @gradle_file ||= Dir.entries(".").select { |s| s == "build.gradle" }.first
22
+ def gradle_files
23
+ @gradle_files ||= `find . -iname build.gradle`
24
24
  end
25
25
 
26
26
  def version
27
- str = IO.read(gradle_file)
28
- str.match(/versionName\s+\"(?<version>.+)\"/)
29
-
30
- str.match(/versionName\s+\"(?<version>.+)\"/)[:version]
27
+ @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
31
35
  end
32
36
 
33
37
  def create_and_push_tag!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
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.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-12 00:00:00.000000000 Z
11
+ date: 2022-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli