fastlane-plugin-versioning_android 0.1.0 → 0.1.1

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
- SHA1:
3
- metadata.gz: 15bae969f46be3a8a3e83bd25718d261ab19fdbf
4
- data.tar.gz: 4c8ded404085de387760b4aaf047f57509965b44
2
+ SHA256:
3
+ metadata.gz: f579270ad456e0040fc01cf9551f47b9021bba4dd71b628e8aab1d4d45e08b99
4
+ data.tar.gz: d06125c50eb443ee7c02a05d199c0e805d6056681114c9614dc745b4494fbbf1
5
5
  SHA512:
6
- metadata.gz: 000f1388360a17d8f631cca27e65a9e112967e3b9270ca96a1ae52cdd5f1c2bfb6d2c7315d675a635e607cb0ca36c962d97af49d9e07578535b77e6a7a007887
7
- data.tar.gz: 3a40ecde89768df83e6cc141b57962784f16375812ad3a968d4aba452b40795fcdf70fbd86c31f14a9f295c80f0e9a3412c099571bbd356a842d8235a5e132ed
6
+ metadata.gz: 615e6e368ff5da83b8233a83aa5a94f41f8b626b24cb94eaccc584ad2de95158df75405ee194e746624cf429dcac0c77952d1cc75f847dbb5b115194034e3ac0
7
+ data.tar.gz: 0e6179b2386237fabe5d008bb3a7a467e38430c88cc6857f7a05a1c03469a48dfba76da725adff0c2feb473c1b03c858f24c1f616099880da62fee69f3b12a29
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # versioning_android plugin
2
2
 
3
+ [![Build Status](https://travis-ci.org/beplus/fastlane-plugin-versioning_android.svg?branch=master)](https://travis-ci.org/beplus/fastlane-plugin-versioning_android)
3
4
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-versioning_android)
4
5
 
5
6
  ## Getting Started
@@ -12,9 +13,12 @@ fastlane add_plugin versioning_android
12
13
 
13
14
  ## About versioning_android
14
15
 
15
- Android Versioning Plugin for Fastlane
16
+ Android Versioning Plugin for Fastlane - easily Get / Set `versionCode` and `versionName` on your Android project.
17
+
18
+ **Note**: If you need to work with `Build Number` and `Version` on iOS, see [versioning_ios](https://github.com/beplus/fastlane-plugin-versioning_ios)
16
19
 
17
20
  ### Available actions
21
+
18
22
  - `android_get_version_code` to get the Version Code
19
23
  - `android_get_version_name` to get the Version Name
20
24
  - `android_set_version_code` to set the new Version Code
@@ -24,7 +28,9 @@ Android Versioning Plugin for Fastlane
24
28
 
25
29
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
26
30
 
27
- You can find a fully functional setup of this plugin in the [UdemyFastlane](https://github.com/igorlamos/udemy-fastlane) repo, where you can also find more info about versioning of Android apps.
31
+ ### Example project
32
+
33
+ **@todo** You can find a fully functional setup of this plugin in the [UdemyFastlane](https://github.com/igorlamos/udemy-fastlane) repo, where you can also find more info about versioning of Android apps.
28
34
 
29
35
  ## Run tests for this plugin
30
36
 
@@ -35,13 +41,22 @@ rake
35
41
  ```
36
42
 
37
43
  To automatically fix many of the styling issues, use
44
+
38
45
  ```
39
46
  rubocop -a
40
47
  ```
41
48
 
42
49
  ## Issues and Feedback
43
50
 
44
- For any other issues and feedback about this plugin, please submit it to this repository.
51
+ ### Flutter
52
+
53
+ The `android_set_version_name` action on Flutter requires a different usage when setting a specific version.
54
+
55
+ To avoid setting a numeral instead of a string in the build.gradle file, the `version_name` argument (string) needs to be wrapped in quotes:
56
+
57
+ ```rb
58
+ android_set_version_name(version_name: '"1.23.4"')
59
+ ```
45
60
 
46
61
  ## Troubleshooting
47
62
 
@@ -7,7 +7,7 @@ module Fastlane
7
7
  class AndroidSetVersionNameAction < Action
8
8
  def self.run(params)
9
9
  gradle_file_path = Helper::VersioningAndroidHelper.get_gradle_file_path(params[:gradle_file])
10
- new_version_name = Helper::VersioningAndroidHelper.get_new_version_name(gradle_file_path, params[:version_name])
10
+ new_version_name = Helper::VersioningAndroidHelper.get_new_version_name(gradle_file_path, params[:version_name], params[:bump_type])
11
11
  # bump_type ||= params[:bump_type]
12
12
 
13
13
  saved = Helper::VersioningAndroidHelper.save_key_to_gradle_file(gradle_file_path, "versionName", new_version_name)
@@ -13,7 +13,7 @@ module Fastlane
13
13
 
14
14
  def self.get_gradle_file_path(gradle_file)
15
15
  gradle_file = self.get_gradle_file(gradle_file)
16
- return File.expand_path(gradle_file).shellescape
16
+ return File.expand_path(gradle_file)
17
17
  end
18
18
 
19
19
  def self.get_new_version_code(gradle_file, new_version_code)
@@ -27,20 +27,20 @@ module Fastlane
27
27
 
28
28
  def self.get_new_version_name(gradle_file, new_version_name, bump_type = nil)
29
29
  if new_version_name.nil?
30
- current_version_name = self.read_key_from_gradle_file(gradle_file, "versionName")
31
- current_version_parts = current_version_name.split(/[.]/)
30
+ new_version_name = self.read_key_from_gradle_file(gradle_file, "versionName")
31
+ end
32
32
 
33
- major = current_version_parts[0].to_i
34
- minor = current_version_parts[1].to_i
35
- patch = current_version_parts[2].to_i
33
+ current_version_parts = new_version_name.split(/[.]/)
34
+ major = current_version_parts[0].to_i
35
+ minor = current_version_parts[1].to_i
36
+ patch = current_version_parts[2].to_i
36
37
 
37
- if bump_type == "major"
38
- new_version_name = "#{major + 1}.0.0"
39
- elsif bump_type == "minor"
40
- new_version_name = "#{major}.#{minor + 1}.0"
41
- elsif bump_type == "patch"
42
- new_version_name = "#{major}.#{minor}.#{patch + 1}"
43
- end
38
+ if bump_type == "major"
39
+ new_version_name = "#{major + 1}.0.0"
40
+ elsif bump_type == "minor"
41
+ new_version_name = "#{major}.#{minor + 1}.0"
42
+ elsif bump_type == "patch"
43
+ new_version_name = "#{major}.#{minor}.#{patch + 1}"
44
44
  end
45
45
 
46
46
  return new_version_name.to_s
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module VersioningAndroid
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-versioning_android
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Lamos
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-21 00:00:00.000000000 Z
11
+ date: 2023-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: 2.66.0
125
- description:
125
+ description:
126
126
  email: igor@be.plus
127
127
  executables: []
128
128
  extensions: []
@@ -141,7 +141,7 @@ homepage: https://github.com/beplus/fastlane-plugin-versioning_android
141
141
  licenses:
142
142
  - MIT
143
143
  metadata: {}
144
- post_install_message:
144
+ post_install_message:
145
145
  rdoc_options: []
146
146
  require_paths:
147
147
  - lib
@@ -156,9 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  requirements: []
159
- rubyforge_project:
160
- rubygems_version: 2.6.13
161
- signing_key:
159
+ rubygems_version: 3.1.6
160
+ signing_key:
162
161
  specification_version: 4
163
162
  summary: Android Versioning Plugin for Fastlane
164
163
  test_files: []