fastlane-plugin-yalantis_ci 0.3.6 → 0.3.7

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: 3a76195cf47d39933d3288a1d51eae9597a5e2a98f1a6ee28284a62a41da3dda
4
- data.tar.gz: 361e997bfbf1332476db89be5751ae8f38431f86e73c2f2a442aeb02cec505da
3
+ metadata.gz: 7e71d3349153fab7a0926badc9f412249eb35729c33723998bd5baf497a41617
4
+ data.tar.gz: c951e30ec230b768c904b36d259b644560b33bace96130b5a1c2f565eb564ee7
5
5
  SHA512:
6
- metadata.gz: fe50ecb431e1a75235381a36d77cac736a31d90bb9f7e65e6335521f911d5b860d012906cc157815d8c4f77bee040bc30e516a67e73e157d6819265dca918576
7
- data.tar.gz: 56fbd9cbdbc74bc81a424b067246a2bc98fa103f1d90751b53a7da053062d527d3ce5d3d127c54c0fe0ba2ff0fd594b2b1003774873c6f5cd970d46c172cd244
6
+ metadata.gz: 72dbadc3a903735a0cb6b0913f84e7af2700af3cc51d1f86bd451c61dee98383687194be17444ac7e8e366c6fa663150b846d78b5d47130d3dccf6824f6f9499
7
+ data.tar.gz: c13a7b734b8f48363d0d516357f85fa84b2687e1ee640d1c881d4fae520914e044930c2e64cca6d7be32a2aa2e872ccfa1e432c790a897a188befe46b7f830bf
@@ -4,17 +4,14 @@ module Fastlane
4
4
  module Actions
5
5
  class BuildNumberSetToXcconfigAction < Action
6
6
  def self.run(options)
7
- build_number = options[:build_number]
7
+ build_number = options[:build_number] || Actions.lane_context[SharedValues::BUILD_NUMBER]
8
8
  path = options[:xcconfig_path]
9
9
 
10
- File.open(path, 'r+') do |file|
11
- contents = file.read
12
- unless contents.nil?
13
- contents.gsub!(/(?<=\bCURRENT_PROJECT_VERSION\s=\s)([\d]+)/, build_number.to_s)
14
-
15
- file.truncate(0)
16
- file.write(contents)
17
- end
10
+ if build_number.nil?
11
+ UI.error("build_number can't be nil")
12
+ else
13
+ contents = File.readlines(path).join.gsub!(/(?<=\bCURRENT_PROJECT_VERSION\s=\s)([\d]+)/, build_number.to_s)
14
+ File.write(path, contents) unless contents.nil?
18
15
  end
19
16
  end
20
17
 
@@ -28,6 +25,7 @@ module Fastlane
28
25
  key: :build_number,
29
26
  env_name: "BUILD_NUMBER",
30
27
  description: "Build number to be set to the .xcconfig",
28
+ optional: true,
31
29
  type: Integer
32
30
  ),
33
31
  FastlaneCore::ConfigItem.new(
@@ -13,10 +13,8 @@ module Fastlane
13
13
  payload_filepath: options[:git_filepath],
14
14
  mutation_callback: options[:mutation_callback]
15
15
  )
16
- unless build_number.nil?
17
- ENV['BUILD_NUMBER'] = build_number.to_s
18
- Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number
19
- end
16
+ Actions.lane_context[SharedValues::BUILD_NUMBER] = build_number unless build_number.nil?
17
+ return build_number
20
18
  end
21
19
 
22
20
  def self.read_from_remote(git_repo_url:, git_repo_branch:, payload_filepath:, mutation_callback: nil)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module YalantisCi
3
- VERSION = "0.3.6"
3
+ VERSION = "0.3.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-yalantis_ci
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dima Vorona
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-14 00:00:00.000000000 Z
11
+ date: 2021-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fastlane-plugin-firebase_app_distribution