fastlane 2.116.0.beta.20190130200045 → 2.116.0.beta.20190131200016

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
  SHA1:
3
- metadata.gz: 8b88a8fa8e27d2e5148109f8a429ef64d9dc680b
4
- data.tar.gz: 83f8c8a49f492eea5e1eac987d19bd3cad12381c
3
+ metadata.gz: 14a8f56d226c291ee5d34ca5bb64a53b68bac250
4
+ data.tar.gz: 4e3b8d9e80c5adc44dff26815c0bc6944b6db3aa
5
5
  SHA512:
6
- metadata.gz: 2f1ab8c798df0544b07b81f0dd9aff8f0f51973237e16f8b5fe942f2264d0f90a37c50d4249af30a36f5d8604545af22e3c4c697abcc27d1e91d1a09ffcbdfdf
7
- data.tar.gz: 4008e35375905143c484f8c451bbcbe06a9e18d7a7812d2c451e83cfed4e2cdb26cc9804908b2a9e15abf3f2eee2758a82208710c4ecd76624035b1e3344bd09
6
+ metadata.gz: 8726254d699ce0e015964994c1bb2d56796a827af3727fee399fee1563769854ff33993c0e747d671f3b8bbe8b90d4a794ace0f6e7443e2ccebdfe8a0341e3dd
7
+ data.tar.gz: d3055facc4583dd12fa9f8b524c8d6963db198930541384fa757b5ecfb929c888772767a0a1818e6f445309a61db4706a194e702ec471fcd1f34d12b17eedd44
@@ -5,18 +5,36 @@ module Fastlane
5
5
 
6
6
  class UpdateProjectTeamAction < Action
7
7
  def self.run(params)
8
- path = params[:path]
9
- path = File.join(path, "project.pbxproj")
10
- UI.user_error!("Could not find path to project config '#{path}'. Pass the path to your project (not workspace)!") unless File.exist?(path)
8
+ project_path = params[:path]
9
+ selected_targets = params[:targets]
11
10
 
12
- UI.message("Updating development team (#{params[:teamid]}) for the given project '#{path}'")
11
+ UI.user_error!("Could not find path to xcodeproj '#{project_path}'. Pass the path to your project (not workspace)!") unless File.exist?(project_path)
13
12
 
14
- p = File.read(path)
15
- p.gsub!(/DevelopmentTeam = .*;/, "DevelopmentTeam = #{params[:teamid]};")
16
- p.gsub!(/DEVELOPMENT_TEAM = .*;/, "DEVELOPMENT_TEAM = #{params[:teamid]};")
17
- File.write(path, p)
13
+ # Load .xcodeproj
14
+ project = Xcodeproj::Project.open(project_path)
18
15
 
19
- UI.success("Successfully updated project settings to use Developer Team ID '#{params[:teamid]}'")
16
+ # Fetch target
17
+ targets = project.native_targets
18
+ if selected_targets
19
+ # Error to user if invalid target
20
+ diff_targets = selected_targets - targets.map(&:name)
21
+ UI.user_error!("Could not find target(s) in the project '#{project_path}' - #{diff_targets.join(',')}") unless diff_targets.empty?
22
+
23
+ targets.select! { |native_target| selected_targets.include?(native_target.name) }
24
+ end
25
+
26
+ # Set teamid in target
27
+ targets.each do |target|
28
+ UI.message("Updating development team (#{params[:teamid]}) for target `#{target.name}` in the project '#{project_path}'")
29
+ # Update the build settings
30
+ target.build_configurations.each do |configuration|
31
+ configuration.build_settings['DEVELOPMENT_TEAM'] = params[:teamid]
32
+ end
33
+
34
+ project.save
35
+
36
+ UI.success("Successfully updated project settings to use Developer Team ID '#{params[:teamid]}' for target `#{target.name}`")
37
+ end
20
38
  end
21
39
 
22
40
  def self.description
@@ -37,6 +55,11 @@ module Fastlane
37
55
  verify_block: proc do |value|
38
56
  UI.user_error!("Path is invalid") unless File.exist?(value)
39
57
  end),
58
+ FastlaneCore::ConfigItem.new(key: :targets,
59
+ env_name: "FL_PROJECT_TARGET",
60
+ description: "Name of the targets you want to update",
61
+ type: Array,
62
+ optional: true),
40
63
  FastlaneCore::ConfigItem.new(key: :teamid,
41
64
  env_name: "FL_PROJECT_TEAM_ID",
42
65
  description: "The Team ID you want to use",
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.116.0.beta.20190130200045'.freeze
2
+ VERSION = '2.116.0.beta.20190131200016'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.116.0.beta.20190130200045
4
+ version: 2.116.0.beta.20190131200016
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Ellis
@@ -27,7 +27,7 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
- date: 2019-01-30 00:00:00.000000000 Z
30
+ date: 2019-01-31 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: slack-notifier
@@ -1687,24 +1687,24 @@ metadata:
1687
1687
  post_install_message:
1688
1688
  rdoc_options: []
1689
1689
  require_paths:
1690
+ - gym/lib
1691
+ - match/lib
1692
+ - produce/lib
1690
1693
  - sigh/lib
1691
- - fastlane/lib
1692
1694
  - credentials_manager/lib
1693
- - scan/lib
1694
- - pem/lib
1695
- - snapshot/lib
1696
- - pilot/lib
1697
- - produce/lib
1698
- - fastlane_core/lib
1699
- - precheck/lib
1700
- - supply/lib
1701
1695
  - cert/lib
1702
1696
  - screengrab/lib
1703
- - gym/lib
1704
- - match/lib
1705
1697
  - spaceship/lib
1698
+ - pilot/lib
1699
+ - pem/lib
1706
1700
  - deliver/lib
1707
1701
  - frameit/lib
1702
+ - scan/lib
1703
+ - snapshot/lib
1704
+ - fastlane_core/lib
1705
+ - fastlane/lib
1706
+ - supply/lib
1707
+ - precheck/lib
1708
1708
  required_ruby_version: !ruby/object:Gem::Requirement
1709
1709
  requirements:
1710
1710
  - - ">="