fastlane-plugin-flutter_bump_version 0.1.1 → 0.1.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: 0bf3cf833cf1e5e66f50e77250ea50754cfe8fdecf79a895a8924ba43b07fa94
4
- data.tar.gz: c898726e88fea4fd19a033ac3812b9da2baa9527c0e9363aabdbef22cb4d0a0d
3
+ metadata.gz: d3409be0f56fe130ae78d0c695fa42e1d73ee3f665f8aa57056718c3449b4afe
4
+ data.tar.gz: 2c19b25901975e7f72fd2adbf42d3cf7329fae3e562411055faaf52dfab64b3f
5
5
  SHA512:
6
- metadata.gz: 31d1462fd4e1122db5136b83f65eae49998b95e9c183e1a669209dd954d9ddf10202a6c53c882499fa359a9754dc2d0904eb1c689d5d11ee87adb5244da7df1d
7
- data.tar.gz: 65e44e438f0f115c7e44a9771ccea8c7a01c7276d168923082ed285aa5cdc439fe6dcdc08cf7a8c739d55b119ce3d937e211c4fe0714ec59a61d44ab3f68fc77
6
+ metadata.gz: a1ee35fd243a1bc85ea9c9ab86b4ec050d7c5867255fee26f050191593837621a703c981096c8819ed6d63a846e1797e0c5e455f41beb0a170b73562cadc5660
7
+ data.tar.gz: 284fa8460ed73deaee9a9893c510c19564b2591486eb2fea031b6b3e7d43ad81f14f6259903d84d3f32ec6fd413bf13d11b02db12abbe674275b73e1be20ab4c
data/README.md CHANGED
@@ -18,7 +18,8 @@ Manages Flutter project version
18
18
 
19
19
  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 bump_version bump:patch push:false`.
20
20
 
21
- You can `bump` any part of version you want by use instead of `patch` (`major`,`minor`,`patch` or `build`)
21
+ You can `bump` any part of version you want by use instead of `patch` (`major`,`minor` or `patch`)
22
+ build (version code) auto-increase based on current version code
22
23
  And the `push` if `true` plugin will push bump version to git remote if `false` will not push it
23
24
 
24
25
  ## Issues and Feedback
@@ -69,18 +69,13 @@ module Fastlane
69
69
  end
70
70
 
71
71
  def configure_build
72
- if @is_build
73
- @current_version_in_hash['build'] + 1
74
- else
75
- @is_major || @is_minor || @is_patch ? 0 : @current_version_in_hash['minor']
76
- end
72
+ @current_version_in_hash['build'] + 1
77
73
  end
78
74
 
79
75
  def bump_version(part)
80
76
  @is_major = part == "major"
81
77
  @is_minor = part == "minor"
82
78
  @is_patch = part == "patch"
83
- @is_build = part == "build"
84
79
  current_version = @pubspec_yaml_reader.field('version')
85
80
  split_current_version = current_version.split(".")
86
81
  build_exist = current_version.count("+") != 0
@@ -92,7 +87,7 @@ module Fastlane
92
87
  @current_version_in_hash['patch'] = configure_patch
93
88
  @current_version_in_hash['build'] = configure_build
94
89
  new_version = "#{@current_version_in_hash['major']}.#{@current_version_in_hash['minor']}.#{@current_version_in_hash['patch']}"
95
- new_version = @is_build ? new_version + "+#{@current_version_in_hash['build']}" : new_version
90
+ new_version += "+#{@current_version_in_hash['build']}"
96
91
  update_pubspec(new_version, current_version)
97
92
  return new_version
98
93
  end
@@ -117,7 +112,7 @@ module Fastlane
117
112
  args.each do |a|
118
113
  case a
119
114
  when :bump
120
- available_version_options = ['major', 'minor', 'patch', 'build']
115
+ available_version_options = ['major', 'minor', 'patch']
121
116
  if available_version_options.include?(arguments[:bump])
122
117
  return bump_version.bump_version(arguments[:bump])
123
118
  else
@@ -126,13 +121,13 @@ module Fastlane
126
121
  end
127
122
  end
128
123
  else
129
- UI.message("Something wrong, Try: bundle exec fastlane bump_version bump:major,minor,patch or build")
124
+ UI.message("Something wrong, Try: bundle exec fastlane bump_version bump:major,minor or patch")
130
125
  end
131
126
  return "not_bump"
132
127
  end
133
128
 
134
129
  def self.description
135
- "Fastlane plugin for upgrade flutter projects version by any part (major,minor,patch or build)"
130
+ "Fastlane plugin for upgrade flutter projects version by any part (major,minor or patch)"
136
131
  end
137
132
 
138
133
  def self.authors
@@ -157,7 +152,7 @@ module Fastlane
157
152
  ),
158
153
  FastlaneCore::ConfigItem.new(
159
154
  key: :arguments,
160
- description: "part you want upgrade (major,minor,patch or build)",
155
+ description: "part you want upgrade (major,minor or patch)",
161
156
  optional: true,
162
157
  type: Hash
163
158
  )
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module FlutterBumpVersion
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.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.1.1
4
+ version: 0.1.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-23 00:00:00.000000000 Z
11
+ date: 2022-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler