fastlane-plugin-sunny_project 0.2.2 → 0.2.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: 42911dd4d19f1f6d97f8a405a4fd77297f9cbaa4bb3799f4aeea86171c7e4937
4
- data.tar.gz: 41feddd1a00ba67e10a18330bed8561b9ebccf52c26c606b2806ef9298fc34af
3
+ metadata.gz: 59cf63456e7e2a30431ae9e827c392de2d9da52fa5f4602bb35a48539cea86f8
4
+ data.tar.gz: 0a9409fb238f02a16ab42ffd6bfe41acb5df6a60df8b7c17a0818fcbe98ea137
5
5
  SHA512:
6
- metadata.gz: 9f01acd98e752ed2d5a2d55574bb6e5cd6730ff83a679c9a1a476871a29781dab9be46b5fb367f790ed3f09821a1001957de22c8a02e3e6b4891ee8adb6de2cb
7
- data.tar.gz: 9d3fa97eb577500c022baced2c03e5f5ed6be59a827d1f2303a1133f162b25f413fd846ee80a8d13f10ade62812d74ee788f0b1c8a8948b725bfb4f57f5fbe06
6
+ metadata.gz: ac4fafa2643f145f2ced488b1757c4364abb7edcf7d5fe93257f54d0d83acb9c1f6d6842a6baee88e5c231fc653fad10f1d1bb6a49427642e1e69cc93e58132d
7
+ data.tar.gz: f354be7738351d1bba611ff61c75e40577a4a867d9f5d850e1b6682a8fe93f74878c7fb5e9d21da9cc2a1f9fb67650f3317aff2bb969adc088f9579511d5a8e6
@@ -49,18 +49,34 @@ module Fastlane
49
49
  end
50
50
 
51
51
  def self.do_increase_version(options)
52
- bump_type = options[:type]
53
- bump_type = "build" unless bump_type
54
- command = "pubver bump #{bump_type}"
55
- unless bump_type.eql?('build')
56
- command += " -b"
57
- end
58
- self.exec_cmd(command.to_s, command)
52
+ curr = self.current_semver
53
+
54
+ if curr.pre
55
+ me = curr.pre
56
+ pos = me.rindex(".")
57
+ pre_id = me[0...pos]
58
+ pre_num = me[pos + 1..-1]
59
+ curr.pre = "#{pre_id}.#{Integer(pre_num) + 1}"
60
+ self.exec_cmd("pubver set #{curr}", "pubver set #{curr}")
61
+ else
62
+ bump_type = options[:type]
63
+ bump_type = "build" unless bump_type
64
+ if bump_type.eql?('build')
65
+ elsif bump_type.eql?('patch')
66
+ elsif bump_type.eql?('minor')
67
+ elsif bump_type.eql?('major')
68
+ end
59
69
 
60
- unless bump_type.eql?('build')
61
- self.exec_cmd("also bump build", "pubver bump build")
62
- end
70
+ command = "pubver bump #{bump_type}"
71
+ unless bump_type.eql?('build')
72
+ command += " -b"
73
+ end
74
+ self.exec_cmd(command.to_s, command)
63
75
 
76
+ unless bump_type.eql?('build')
77
+ self.exec_cmd("also bump build", "pubver bump build")
78
+ end
79
+ end
64
80
  self.current_semver
65
81
  end
66
82
 
@@ -87,7 +103,7 @@ module Fastlane
87
103
  joined = command.join(" ")
88
104
  if args[:verbose]
89
105
  begin
90
- return Fastlane::Actions.sh(*command, log:true, error_callback: ->(str) { UI.user_error!(">> #{name} failed << \n #{str}") })
106
+ return Fastlane::Actions.sh(*command, log: true, error_callback: ->(str) { UI.user_error!(">> #{name} failed << \n #{str}") })
91
107
  rescue StandardError => e
92
108
  UI.user_error!(">> #{name} failed << \n #{e}")
93
109
  end
@@ -124,14 +140,14 @@ module Fastlane
124
140
  # process fails, we should revert this because it will mess up our commit logs
125
141
  self.run_action(Fastlane::Actions::GitAddAction, path: %w[./pubspec.yaml ./pubspec.lock ./CHANGELOG.md])
126
142
  self.run_action(Fastlane::Actions::GitCommitAction, path: %w[./pubspec.yaml ./pubspec.lock ./CHANGELOG.md],
127
- allow_nothing_to_commit: false,
143
+ allow_nothing_to_commit: false,
128
144
 
129
- message: "Version bump to: #{version.major}.#{version.minor}.#{version.patch}#800#{version.build}")
145
+ message: "Version bump to: #{version.major}.#{version.minor}.#{version.patch}#800#{version.build}")
130
146
  self.run_action(Fastlane::Actions::AddGitTagAction,
131
- tag: "sunny/builds/v#{version.build}",
132
- force: true,
133
- sign: false,
134
- )
147
+ tag: "sunny/builds/v#{version.build}",
148
+ force: true,
149
+ sign: false,
150
+ )
135
151
  self.run_action(Fastlane::Actions::PushGitTagsAction, force: true)
136
152
  if File.exist?(self.release_notes_file)
137
153
  File.delete(self.release_notes_file)
@@ -230,7 +246,7 @@ module Fastlane
230
246
  self.run_action(Fastlane::Actions::IncrementVersionNumberAction,
231
247
  version_number: "#{version.major}.#{version.minor}.#{version.patch}",
232
248
  xcodeproj: "ios/Runner.xcodeproj"
233
- )
249
+ )
234
250
  else
235
251
  UI.user_error!("No version found")
236
252
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module SunnyProject
3
- VERSION = "0.2.2"
3
+ VERSION = "0.2.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-sunny_project
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ericmartineau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-01 00:00:00.000000000 Z
11
+ date: 2021-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry