gonative-cli 1.0.0 → 1.0.3

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: f0cbebe24c4048ee123245be0352a99ead03f0ef5eb0f03a5b0acf61b818a1b7
4
- data.tar.gz: 970f962d44fa10f55c66736261986867497967df383a7cbae502c3a42f1dba12
3
+ metadata.gz: b042666117ea5bf6adfb69b3089b800d958ceb13270d5cbb0e5df5521f8a17b4
4
+ data.tar.gz: 8a19322f007c754c60048298c58851c3cd7e1b7d1a5a3b8d0e742c21ffaa5589
5
5
  SHA512:
6
- metadata.gz: 1e7914e087363e1711081a7f730d6d3b8a7123e9b2d42e5e284d4626d93b7550d4110e2fab3e6197ea735dcd470a0d7970c07945a4e961225d5dc14c0846dae3
7
- data.tar.gz: '0579e6ef7475474e625f4da6ab95d3f18553962b5b7d20a5d84ff99fb06b8a046a7d2d58d4781895e597d97d8532afb583c91b5af9534e92fa6dcf4abc8e603b'
6
+ metadata.gz: c0ef3776e2f1e2c61abd61334edd951819560a60b30ce4cd6f776028c74137eff846fafbb3db531243ad834ccc6a83590ec9f87ea84a0bcf6971663c80b908d3
7
+ data.tar.gz: cc2469f803de1e267d3d6706773ce6398d8a35c5c9704eef5312f6612ce7e565de80346e9b26dd143267d0a47147ab3ed23b368ea1b47782f4d24505c64bf7ed
Binary file
@@ -12,19 +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
- Dir.entries(".").select { |s| s == "build.gradle" }.first
22
+ def gradle_files
23
+ @gradle_files ||= `find . -iname build.gradle`.split("\n")
24
24
  end
25
25
 
26
26
  def version
27
- @version ||= `grep -o "versionName\s.*\d.\d.\d" build.gradle | awk '{ print $2 }' | tr -d \''"\'`
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
28
35
  end
29
36
 
30
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.0"
4
+ VERSION = "1.0.3"
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.0
4
+ version: 1.0.3
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
@@ -184,6 +184,7 @@ files:
184
184
  - bin/console
185
185
  - bin/gonative
186
186
  - bin/setup
187
+ - gonative-cli-1.0.2.gem
187
188
  - gonative-cli.gemspec
188
189
  - lib/gonative.rb
189
190
  - lib/gonative/commands.rb