fastlane-plugin-flutter_bump_version 0.1.1 → 0.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1064b20657a45a14d78e09e6abd1d56b4e48289460e210839cfaf8f54c8bb3e
|
4
|
+
data.tar.gz: 5b81f2e53b86780f6728c0e382cc06ba3abafbaf5ad82cfd435f41f9f73965aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c32d9fe80c2dc1307fe54679545cdb43adbf93b7b6a9c95326727b337d0806dbcb9909299bcd218561c5e7186174d7f60f53a70c7cbf7b750cfd203fbbbae10
|
7
|
+
data.tar.gz: dfa5b03b41bdceeaebd373f44b1d75ead37a81a06f84c7c9fba97b0041fd945c03d3e422eb2ebefcea0258630358202aa551deb710c38145c29832d38d0f18e9
|
data/README.md
CHANGED
@@ -18,7 +18,9 @@ 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
|
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
|
+
if you not pass any option with command will bump build as default
|
22
24
|
And the `push` if `true` plugin will push bump version to git remote if `false` will not push it
|
23
25
|
|
24
26
|
## Issues and Feedback
|
@@ -69,18 +69,13 @@ module Fastlane
|
|
69
69
|
end
|
70
70
|
|
71
71
|
def configure_build
|
72
|
-
|
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
|
90
|
+
new_version += "+#{@current_version_in_hash['build']}"
|
96
91
|
update_pubspec(new_version, current_version)
|
97
92
|
return new_version
|
98
93
|
end
|
@@ -109,30 +104,13 @@ module Fastlane
|
|
109
104
|
class FlutterBumpVersionAction < Action
|
110
105
|
def self.run(params)
|
111
106
|
pubspec_path = params[:pubspec] || '../'
|
112
|
-
|
113
|
-
args = arguments.keys
|
107
|
+
part = params[:part] || "build"
|
114
108
|
bump_version = FlutterBumpVersion.new(pubspec_path)
|
115
|
-
|
116
|
-
if args.include?(:bump)
|
117
|
-
args.each do |a|
|
118
|
-
case a
|
119
|
-
when :bump
|
120
|
-
available_version_options = ['major', 'minor', 'patch', 'build']
|
121
|
-
if available_version_options.include?(arguments[:bump])
|
122
|
-
return bump_version.bump_version(arguments[:bump])
|
123
|
-
else
|
124
|
-
UI.message("You pass with bump wrong option, Available options : #{available_version_options}")
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end
|
128
|
-
else
|
129
|
-
UI.message("Something wrong, Try: bundle exec fastlane bump_version bump:major,minor,patch or build")
|
130
|
-
end
|
131
|
-
return "not_bump"
|
109
|
+
bump_version.bump_version(part)
|
132
110
|
end
|
133
111
|
|
134
112
|
def self.description
|
135
|
-
"Fastlane plugin for upgrade flutter projects version by any part (major,minor
|
113
|
+
"Fastlane plugin for upgrade flutter projects version by any part (major,minor or patch)"
|
136
114
|
end
|
137
115
|
|
138
116
|
def self.authors
|
@@ -156,10 +134,10 @@ module Fastlane
|
|
156
134
|
type: String
|
157
135
|
),
|
158
136
|
FastlaneCore::ConfigItem.new(
|
159
|
-
key: :
|
160
|
-
description: "part you want upgrade (major,minor
|
137
|
+
key: :part,
|
138
|
+
description: "part you want upgrade (major,minor or patch)",
|
161
139
|
optional: true,
|
162
|
-
type:
|
140
|
+
type: String
|
163
141
|
)
|
164
142
|
]
|
165
143
|
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.
|
4
|
+
version: 0.1.3
|
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-
|
11
|
+
date: 2022-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|