fastlane-plugin-wpmreleasetoolkit 12.3.2 → 12.3.4

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: 5d1ae017f2f4ff6698ebb16ece9e728b7d374753e7e83ba9b4a895ad7fb3672f
4
- data.tar.gz: 8b7520329b13a56256f7201cbffc1223650d27bbf08647445ede487e7041b956
3
+ metadata.gz: b59d8ce8652d5491809fc8a80bf3e08b35a3d65f244eb9f7f8faccb212ba9c81
4
+ data.tar.gz: aea9e1d13eb564f07088120c9f763aa2042bc34c0672ca938670b0ee1e698209
5
5
  SHA512:
6
- metadata.gz: ce09a3110689bc2808c7bc9df9f523b098d6aa8f424a5fd9702b2cff7e35d07127fba7794c3ee41c27813ac416da737795958c0545b7e2639baab25bf29c030d
7
- data.tar.gz: 3db61d5ac271629ee125f96b1ff426e346906d2074330ba6d27fda2048438fb1aa2984085867e849e95a8ec69bff5a83e8c37c1df66b0604a32029894ef6441e
6
+ metadata.gz: c3dca2f486e3ff752f89b8b27a36d5f2287dc9c529eb46efe10ca6c6168ebfa595489921ae4a550c80e6b1f10f616401ba53e8e1ce102210f478c79f16bbde6a
7
+ data.tar.gz: 3dc7792faa4d46efabde9c7075f198dae635b15be7a9cc9a157610c23fec524ed3a5ebb28e6e3377cb0e5313a313579debcc1ee41abb10308eaafcb063b0c427
@@ -63,7 +63,8 @@ module Fastlane
63
63
  # Parse the first font in each `font-family` attribute found in all found CSS files.
64
64
  # Only the first in each `font-family` font list matters, as others are fallbacks we don't want to use anyway.
65
65
  font_families = all_stylesheets.flat_map do |s|
66
- File.readlines(s).flat_map do |line|
66
+ stylesheet_path = resolve_path(s)
67
+ File.readlines(stylesheet_path).flat_map do |line|
67
68
  attr = line.match(/font-family: (.*);/)&.captures&.first
68
69
  attr.split(',').first.strip.gsub(/'(.*)'/, '\1').gsub(/"(.*)"/, '\1') unless attr.nil?
69
70
  end
@@ -282,9 +283,9 @@ module Fastlane
282
283
  begin
283
284
  temp_text_file = Tempfile.new
284
285
 
285
- Action.sh('drawText', "html=#{text}", "maxWidth=#{width}", "maxHeight=#{height}", "output=#{tempTextFile.path}", "fontSize=#{font_size}", "stylesheet=#{stylesheet_path}", "alignment=#{position}")
286
+ Action.sh('drawText', "html=#{text}", "maxWidth=#{width}", "maxHeight=#{height}", "output=#{temp_text_file.path}", "fontSize=#{font_size}", "stylesheet=#{stylesheet_path}", "alignment=#{position}")
286
287
 
287
- text_content = open_image(tempTextFile.path).trim
288
+ text_content = open_image(temp_text_file.path).trim
288
289
  text_frame = create_image(width, height)
289
290
  text_frame = case position
290
291
  when 'left' then composite_image_left(text_frame, text_content, 0, 0)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Fastlane
4
4
  module Wpmreleasetoolkit
5
- VERSION = '12.3.2'
5
+ VERSION = '12.3.4'
6
6
  end
7
7
  end
@@ -8,19 +8,18 @@ module Fastlane
8
8
  class DateVersionCalculator < AbstractVersionCalculator
9
9
  # Calculate the next date-based release version.
10
10
  #
11
- # If the current month is December, the method prompts the user to determine if the next
12
- # release will be the first release of the next year. If so, it increments the major version
13
- # and sets the minor version to 1, resetting the patch and build number components to zero.
14
- # Otherwise, it calculates the next minor version.
11
+ # When increment_to_next_year is true, increments the major version (representing the year) and resets all other
12
+ # components (minor to 1, patch and build number to 0). Otherwise, calculates the
13
+ # next minor version using the parent class implementation.
15
14
  #
16
15
  # @param [AppVersion] version The version to calculate the next date-based release version for.
16
+ # @param [Boolean] increment_to_next_year Whether to increment the version to the next year. Defaults to false.
17
17
  #
18
18
  # @return [AppVersion] The next date-based release version.
19
19
  #
20
- def next_release_version(version:)
21
- new_version = version.dup
22
- first_release_of_year = FastlaneCore::UI.confirm('Is this release the first release of next year?') if Time.now.month == 12
23
- if first_release_of_year
20
+ def next_release_version(version:, increment_to_next_year: false)
21
+ if increment_to_next_year
22
+ new_version = version.dup
24
23
  new_version.major += 1
25
24
  new_version.minor = 1
26
25
  new_version.patch = 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-wpmreleasetoolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.3.2
4
+ version: 12.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Automattic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-14 00:00:00.000000000 Z
11
+ date: 2024-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport