fastlane-plugin-flutter_bump_version 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0b63260d2d10beb5f5b682ad4b1724758250200bcc1e4b3a22ca82ad4869922b
4
- data.tar.gz: f4e7fe350c26b929470aea33e16fb359ca7dcd6844ccd79cb64c40c05d1baa93
3
+ metadata.gz: d3409be0f56fe130ae78d0c695fa42e1d73ee3f665f8aa57056718c3449b4afe
4
+ data.tar.gz: 2c19b25901975e7f72fd2adbf42d3cf7329fae3e562411055faaf52dfab64b3f
5
5
  SHA512:
6
- metadata.gz: 963ec1b1eb51094c345f78b095b332377c49e2b87b2aa77329cdaffe23def06f949dbb12ad19b5a56689cd20b5f90f678e068a4c6f5a08405e9bbee860d40699
7
- data.tar.gz: 6cb389130b0b1b678553117a4beb5bc324fae5ec9731985dbd1435b308750509cf163f3596905afb63b0fc16dd8edfa9cba76afe12394277903047229c069633
6
+ metadata.gz: a1ee35fd243a1bc85ea9c9ab86b4ec050d7c5867255fee26f050191593837621a703c981096c8819ed6d63a846e1797e0c5e455f41beb0a170b73562cadc5660
7
+ data.tar.gz: 284fa8460ed73deaee9a9893c510c19564b2591486eb2fea031b6b3e7d43ad81f14f6259903d84d3f32ec6fd413bf13d11b02db12abbe674275b73e1be20ab4c
data/README.md CHANGED
@@ -16,9 +16,11 @@ Manages Flutter project version
16
16
 
17
17
  ## Example
18
18
 
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`.
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
23
+ And the `push` if `true` plugin will push bump version to git remote if `false` will not push it
22
24
 
23
25
  ## Issues and Feedback
24
26
 
@@ -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,8 +87,9 @@ 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)
92
+ return new_version
97
93
  end
98
94
 
99
95
  def update_pubspec(new_version, current_version)
@@ -116,21 +112,22 @@ module Fastlane
116
112
  args.each do |a|
117
113
  case a
118
114
  when :bump
119
- available_version_options = ['major', 'minor', 'patch', 'build']
115
+ available_version_options = ['major', 'minor', 'patch']
120
116
  if available_version_options.include?(arguments[:bump])
121
- bump_version.bump_version(arguments[:bump])
117
+ return bump_version.bump_version(arguments[:bump])
122
118
  else
123
119
  UI.message("You pass with bump wrong option, Available options : #{available_version_options}")
124
120
  end
125
121
  end
126
122
  end
127
123
  else
128
- 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")
129
125
  end
126
+ return "not_bump"
130
127
  end
131
128
 
132
129
  def self.description
133
- "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)"
134
131
  end
135
132
 
136
133
  def self.authors
@@ -155,7 +152,7 @@ module Fastlane
155
152
  ),
156
153
  FastlaneCore::ConfigItem.new(
157
154
  key: :arguments,
158
- description: "part you want upgrade (major,minor,patch or build)",
155
+ description: "part you want upgrade (major,minor or patch)",
159
156
  optional: true,
160
157
  type: Hash
161
158
  )
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module FlutterBumpVersion
3
- VERSION = "0.1.0"
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.0
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-22 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