fastlane-plugin-flutter_bump_version 0.2.0 → 0.2.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: 3d48625bc06b18d4b615207477e6cfd062429fb892d6036ce0d877a96e4fbba4
4
- data.tar.gz: f93a143ffa8884875564aacf7f5227a821cc28035b71182f7a8fe29850cbd31e
3
+ metadata.gz: b57a4e3fce387ecc52be8f96d19da7db9f802b506723317153b4b7fd954246c1
4
+ data.tar.gz: 00ac5a33ba1a908e3363af3fe0b62518c001dd66e7aa56179662db8ae37e35bb
5
5
  SHA512:
6
- metadata.gz: 4f773201143302b33f2ae5332da847baa810e954d20f119b899d870f3aa0ec41c3d833a17105423502fb20b51a1742584b6558464616c3b23c0f536aa3c0b3fb
7
- data.tar.gz: 90c55a664663a078f2c6e52316f4645cbc321f23ea19a5a9a11c86023d5eff3de28da35582bf535117d2ba3b0e989b7045d1e5391785822588ee566dc38d8039
6
+ metadata.gz: 95cd97e7fdb269ca48c533cedc4cf5f4c4adb3325637f61a4c6643e68452a9de922048f78a7a1fcf7e0974838ca5fb4d433aa038c532ff22646a2d5a433b8c5f
7
+ data.tar.gz: 5c0c8c007469daf8ec5931e878d1c4e1ce7ca4fbb75cb601139794cb131875a4124cf4df08cee9ca240141435c5025c8086d7c11f641a93ef84258f6eb4a6fb3
data/README.md CHANGED
@@ -30,10 +30,10 @@ old version : 1.0.0
30
30
  ```
31
31
  new version : 2.2.1
32
32
 
33
- build (version code) auto-increase based on current version code
33
+ build (version code) auto-increase based on current version code & you can disable it by pass `false` with bump_build parameter
34
34
  if you not pass any option or wrong option with command will bump build as default
35
35
 
36
- And the `push` if `true` plugin will push bump version to git remote if `false` will not push it
36
+ And the `push` if `true` plugin will bump version & create tag from it then push to git remote if `false` not do anything
37
37
 
38
38
  ## Issues and Feedback
39
39
 
@@ -78,7 +78,7 @@ module Fastlane
78
78
  bump_build ? @current_version_in_hash['build'] + 1 : @current_version_in_hash['build']
79
79
  end
80
80
 
81
- def bump_version(parts)
81
+ def bump_version(parts, bump_build)
82
82
  @increase_major = parts.count("major")
83
83
  @increase_minor = parts.count("minor")
84
84
  @increase_patch = parts.count("patch")
@@ -92,12 +92,12 @@ module Fastlane
92
92
  configure_major(part)
93
93
  configure_minor(part)
94
94
  configure_patch(part)
95
- @current_version_in_hash['build'] = configure_build(parts.uniq.max == part)
95
+ @current_version_in_hash['build'] = configure_build(parts.uniq.max == part && bump_build)
96
96
  end
97
97
  new_version = "#{@current_version_in_hash['major']}.#{@current_version_in_hash['minor']}.#{@current_version_in_hash['patch']}"
98
98
  new_version += "+#{@current_version_in_hash['build']}"
99
99
  update_pubspec(new_version, current_version)
100
- return new_version
100
+ return Hash(new: new_version, previous: current_version)
101
101
  end
102
102
 
103
103
  def update_pubspec(new_version, current_version)
@@ -113,9 +113,10 @@ module Fastlane
113
113
  def self.run(params)
114
114
  pubspec_path = params[:pubspec] || '../'
115
115
  parts = params[:parts] || "build"
116
+ bump_build = params[:bump_build].to_s.empty? ? true : params[:bump_build]
116
117
  split_parts = parts.split(",")
117
118
  bump_version = FlutterBumpVersion.new(pubspec_path)
118
- bump_version.bump_version(split_parts)
119
+ bump_version.bump_version(split_parts, bump_build)
119
120
  end
120
121
 
121
122
  def self.description
@@ -147,6 +148,12 @@ module Fastlane
147
148
  description: "part you want upgrade (major,minor or patch)",
148
149
  optional: true,
149
150
  type: String
151
+ ),
152
+ FastlaneCore::ConfigItem.new(
153
+ key: :bump_build,
154
+ description: "handle bump build as default true",
155
+ optional: true,
156
+ type: Boolean
150
157
  )
151
158
  ]
152
159
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module FlutterBumpVersion
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-flutter_bump_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mohammed chahboun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-28 00:00:00.000000000 Z
11
+ date: 2022-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler