fastlane-plugin-get_android_version 0.2.0 → 0.3.0

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
  SHA1:
3
- metadata.gz: 2d2f41cbba0142d6f13335234f688ace8848442e
4
- data.tar.gz: f21fc0953619eea33ded5d8833ca280c60545a94
3
+ metadata.gz: f00d608489383c0c3c025bdf75387af0e3ab00d7
4
+ data.tar.gz: 654dd0045dcbeb7cff07b1dd4b5bd3be188a9545
5
5
  SHA512:
6
- metadata.gz: 167f593f5ea3345aca41bfc184bd740630a5c2ffa65f82044dfabb6c9825cbc0abbf0fecbfb93c4a572d4b4afb3d598a4b9531b93255e5365cf082f54887dbec
7
- data.tar.gz: 3854057bc4db65f66605cc982d6b314cde53866b86a475869eebcb41672c01c16f38c961da443e08d520cd032c2711819ae0942f36613ed0af0db4526ef583f1
6
+ metadata.gz: 46e8042cb431895afb91ea55f0194fba46c7bbd47d4154ba8ef7d3164cb9ad4335759213930852eb837c73a3edd3a6d86247d802cad59d36b117620f1a18bdf5
7
+ data.tar.gz: 9c90e9877ccb90256ff2681ab850b265b07c7d60ef5a1fa695bdb2ac62f197c61aa33c2a677e807b888c9468866a70a4ad7f9457c681815f7bd4ac2d30b6e2ee
@@ -3,6 +3,7 @@ module Fastlane
3
3
  module SharedValues
4
4
  GET_ANDROID_VERSION_NAME = :GET_ANDROID_VERSION_NAME
5
5
  GET_ANDROID_VERSION_CODE = :GET_ANDROID_VERSION_CODE
6
+ GET_ANDROID_VERSION_APP_NAME = :GET_ANDROID_VERSION_APP_NAME
6
7
  end
7
8
  class GetAndroidVersionAction < Action
8
9
  def self.run(params)
@@ -20,17 +21,22 @@ module Fastlane
20
21
 
21
22
  versionCode = nil
22
23
  versionName = nil
24
+ appName = nil
23
25
 
24
26
  elements.each do |element|
25
- if element.name != "manifest"
26
- next
27
- end
28
-
29
- element.attributes.each do |attr|
30
- if attr.name == "versionCode"
31
- versionCode = attr.value
32
- elsif attr.name == "versionName"
33
- versionName = attr.value
27
+ if element.name == "manifest"
28
+ element.attributes.each do |attr|
29
+ if attr.name == "versionCode"
30
+ versionCode = attr.value
31
+ elsif attr.name == "versionName"
32
+ versionName = attr.value
33
+ end
34
+ end
35
+ elsif element.name == "application"
36
+ element.attributes.each.do |attr|
37
+ if attr.name == "label"
38
+ appName == attr.value
39
+ end
34
40
  end
35
41
  end
36
42
  end
@@ -41,8 +47,9 @@ module Fastlane
41
47
 
42
48
  Actions.lane_context[SharedValues::GET_ANDROID_VERSION_NAME] = "#{versionName}"
43
49
  Actions.lane_context[SharedValues::GET_ANDROID_VERSION_CODE] = "#{versionCode}"
50
+ Actions.lane_context[SharedValues::GET_ANDROID_VERSION_APP_NAME] = "#{appName}"
44
51
 
45
- UI.message("extracted versionName: #{versionName} & versionCode: #{versionCode}")
52
+ UI.message("extracted versionName: #{versionName} & versionCode: #{versionCode} & appName: #{appName}")
46
53
  end
47
54
 
48
55
  def self.description
@@ -76,6 +83,7 @@ module Fastlane
76
83
  [
77
84
  ['GET_ANDROID_VERSION_NAME', 'The versionName extracted from the apk\'s manifest file.'],
78
85
  ['GET_ANDROID_VERSION_CODE', 'The versionCode extracted from the apk\'s manifest file. Hex values are converted to ints.']
86
+ ['GET_ANDROID_VERSION_APP_NAME', 'The appNmae extracted from the apk\'s manifest file.']
79
87
  ]
80
88
  end
81
89
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GetAndroidVersion
3
- VERSION = "0.2.0"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-get_android_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - MaximusMcCann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-26 00:00:00.000000000 Z
11
+ date: 2016-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apktools