fastlane 1.25.1 → 1.26.0

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
  SHA1:
3
- metadata.gz: 25bfd11d222373cfec33fe9af38642f5683e89c8
4
- data.tar.gz: bccbfa52efc2954838e8e3335651fa7b998cc35e
3
+ metadata.gz: 663f4e4e95e09eb021d28e816ea774d8a17e8a61
4
+ data.tar.gz: 92fc73748d4e5087e05ac440e19ca4a1eacc4090
5
5
  SHA512:
6
- metadata.gz: 9b8afd57ce3eedb2fc4b26542403ef95c31997b4e9ad27e7419c11b74122eff55434e78a2e51ab9f6c7cfe4cfce51bd6f3c4f3f838b7b93964536ee8939cd805
7
- data.tar.gz: 56fbeca07c76fd8749018050e188131071b2201c31783a0843ba1c534a070bcb3919ef7e5cc175cca8c217b98b7d5cf9ba6e572e4613a5c816eb07158d2fb496
6
+ metadata.gz: 4dcf7d32861b45779b7c5070e22c3b181f945b43bf71de9b8ee4d60b1afee309effec620ab01002cbac47093a04e95c346f056f7a54188581a283ee865deaaa0
7
+ data.tar.gz: 794c94575b2a7444963c8b8d95e2c89f23116c8ec770c5edc5549ab07edcd877be747efaf94b72bf005e6ee7f1c50ab6ffc89f92f36d4c4926cfaaf15db58c5f
@@ -23,6 +23,8 @@ class FastlaneApplication
23
23
  program :help, 'GitHub', 'https://github.com/krausefx/fastlane'
24
24
  program :help_formatter, :compact
25
25
 
26
+ always_trace!
27
+
26
28
  command :run do |c|
27
29
  c.syntax = 'fastlane run [lane]'
28
30
  c.description = 'Drive the fastlane for a specific environment. Pass the lane name and optionally the platform first'
@@ -2,6 +2,8 @@ module Fastlane
2
2
  module Actions
3
3
  class ArtifactoryAction < Action
4
4
  def self.run(params)
5
+ Actions.verify_gem!('artifactory')
6
+
5
7
  require 'artifactory'
6
8
  file_path = File.absolute_path(params[:file])
7
9
  if File.exist? file_path
@@ -26,9 +28,9 @@ module Fastlane
26
28
  end
27
29
 
28
30
  def self.connect_to_artifactory(params)
29
- keys = [:endpoint, :username, :password, :ssl_pem_file, :ssl_verify, :proxy_username, :proxy_password, :proxy_address, :proxy_port]
30
- keys.each do |key|
31
- config[key] = params[key] if params[key]
31
+ config_keys = [:endpoint, :username, :password, :ssl_pem_file, :ssl_verify, :proxy_username, :proxy_password, :proxy_address, :proxy_port]
32
+ config = params.values.select do |key|
33
+ config_keys.include? key
32
34
  end
33
35
  Artifactory::Client.new(config)
34
36
  end
@@ -2,6 +2,7 @@ module Fastlane
2
2
  module Actions
3
3
  class CocoapodsAction < Action
4
4
  def self.run(params)
5
+ Actions.verify_gem!('cocoapods')
5
6
  cmd = []
6
7
 
7
8
  unless params[:podfile].nil?
@@ -88,4 +89,3 @@ module Fastlane
88
89
  end
89
90
  end
90
91
  end
91
- # vim: set et sw=2 ts=2 :
@@ -0,0 +1,45 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ end
5
+
6
+ class DotgpgEnvironmentAction < Action
7
+ def self.run(options)
8
+ Actions.verify_gem!('dotgpg')
9
+ require 'dotgpg/environment'
10
+
11
+ Helper.log.info "Reading secrets from #{options[:dotgpg_file]}"
12
+ Dotgpg::Environment.new(options[:dotgpg_file]).apply
13
+ end
14
+
15
+ def self.description
16
+ "Reads in production secrets set in a dotgpg file and puts them in ENV"
17
+ end
18
+
19
+ def self.details
20
+ "More information about dotgpg can be found at https://github.com/ConradIrwin/dotgpg"
21
+ end
22
+
23
+ def self.available_options
24
+ [
25
+ FastlaneCore::ConfigItem.new(key: :dotgpg_file,
26
+ env_name: "DOTGPG_FILE",
27
+ description: "Path to your gpg file",
28
+ default_value: Dir["dotgpg/*.gpg"].last,
29
+ optional: false,
30
+ verify_block: proc do |value|
31
+ raise "Dotgpg file '#{File.expand_path(value)}' not found".red unless File.exist?(value)
32
+ end)
33
+ ]
34
+ end
35
+
36
+ def self.authors
37
+ ["simonlevy5"]
38
+ end
39
+
40
+ def self.is_supported?(platform)
41
+ true
42
+ end
43
+ end
44
+ end
45
+ end
@@ -32,7 +32,7 @@ module Fastlane
32
32
 
33
33
  case response[:status]
34
34
  when 201
35
- Helper.log.info "Successfully created release at tag \"#{params[:tag_name]}\" on GitHub!".green
35
+ Helper.log.info "Successfully created release at tag \"#{params[:tag_name]}\" on GitHub".green
36
36
  body = JSON.parse(response.body)
37
37
  html_url = body['html_url']
38
38
  release_id = body['id']
@@ -6,6 +6,8 @@ module Fastlane
6
6
 
7
7
  class SlatherAction < Action
8
8
  def self.run(params)
9
+ Actions.verify_gem!('slather')
10
+
9
11
  command = "slather coverage "
10
12
  command += " --build-directory #{params[:build_directory]}"
11
13
  command += " --input-format #{params[:input_format]}" if params[:input_format]
@@ -5,6 +5,10 @@ module Fastlane
5
5
 
6
6
  class UpdateProjectCodeSigningAction < Action
7
7
  def self.run(params)
8
+ Helper.log.info "You shouldn't use update_project_code_signing"
9
+ Helper.log.info "Have you considered using the recommended way to do code sining?"
10
+ Helper.log.info "https://github.com/KrauseFx/fastlane/blob/master/docs/CodeSigning.md"
11
+
8
12
  path = params[:path]
9
13
  path = File.join(path, "project.pbxproj")
10
14
  raise "Could not find path to project config '#{path}'. Pass the path to your project (not workspace)!".red unless File.exist?(path)
@@ -7,6 +7,10 @@ module Fastlane
7
7
  class UpdateProjectProvisioningAction < Action
8
8
  ROOT_CERTIFICATE_URL = "http://www.apple.com/appleca/AppleIncRootCertificate.cer"
9
9
  def self.run(params)
10
+ Helper.log.info "You shouldn't use update_project_provisioning"
11
+ Helper.log.info "Have you considered using the recommended way to do code sining?"
12
+ Helper.log.info "https://github.com/KrauseFx/fastlane/blob/master/docs/CodeSigning.md"
13
+
10
14
  # assign folder from parameter or search for xcodeproj file
11
15
  folder = params[:xcodeproj] || Dir["*.xcodeproj"].first
12
16
 
@@ -0,0 +1,79 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ PODSPEC_VERSION_NUMBER = :PODSPEC_VERSION_NUMBER
5
+ end
6
+
7
+ class VersionBumpPodspecAction < Action
8
+ def self.run(params)
9
+ podspec_path = params[:path]
10
+
11
+ raise "Could not find podspec file at path #{podspec_path}".red unless File.exist? podspec_path
12
+
13
+ version_podspec_file = Helper::PodspecHelper.new(podspec_path)
14
+
15
+ if params[:version_number]
16
+ new_version = params[:version_number]
17
+ else
18
+ new_version = version_podspec_file.bump_version(params[:bump_type])
19
+ end
20
+
21
+ version_podspec_file.update_podspec(new_version)
22
+
23
+ Actions.lane_context[SharedValues::PODSPEC_VERSION_NUMBER] = new_version
24
+ end
25
+
26
+ #####################################################
27
+ # @!group Documentation
28
+ #####################################################
29
+
30
+ def self.description
31
+ "Increment or set the version in a podspec file"
32
+ end
33
+
34
+ def self.details
35
+ [
36
+ "You can use this action to manipulate any 'version' variable contained in a ruby file.",
37
+ "For example, you can use it to bump the version of a cocoapods' podspec file."
38
+ ].join("\n")
39
+ end
40
+
41
+ def self.available_options
42
+ [
43
+ FastlaneCore::ConfigItem.new(key: :path,
44
+ env_name: "FL_VERSION_BUMP_PODSPEC_PATH",
45
+ description: "You must specify the path to the podspec file to update",
46
+ default_value: Dir["*.podspec"].last,
47
+ verify_block: proc do |value|
48
+ raise "Please pass a path to the `version_bump_podspec` action".red if value.length == 0
49
+ end),
50
+ FastlaneCore::ConfigItem.new(key: :bump_type,
51
+ env_name: "FL_VERSION_BUMP_PODSPEC_BUMP_TYPE",
52
+ description: "The type of this version bump. Available: patch, minor, major",
53
+ default_value: "patch",
54
+ verify_block: proc do |value|
55
+ raise "Available values are 'patch', 'minor' and 'major'" unless ['patch', 'minor', 'major'].include? value
56
+ end),
57
+ FastlaneCore::ConfigItem.new(key: :version_number,
58
+ env_name: "FL_VERSION_BUMP_PODSPEC_VERSION_NUMBER",
59
+ description: "Change to a specific version. This will replace the bump type value",
60
+ optional: true)
61
+ ]
62
+ end
63
+
64
+ def self.output
65
+ [
66
+ ['PODSPEC_VERSION_NUMBER', 'The new podspec version number']
67
+ ]
68
+ end
69
+
70
+ def self.authors
71
+ ["Liquidsoul", "KrauseFx"]
72
+ end
73
+
74
+ def self.is_supported?(platform)
75
+ true
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,50 @@
1
+ module Fastlane
2
+ module Actions
3
+ class VersionGetPodspecAction < Action
4
+ def self.run(params)
5
+ podspec_path = params[:path]
6
+
7
+ raise "Could not find podspec file at path '#{podspec_path}'".red unless File.exist? podspec_path
8
+
9
+ version_podspec_file = Helper::PodspecHelper.new(podspec_path)
10
+
11
+ Actions.lane_context[SharedValues::PODSPEC_VERSION_NUMBER] = version_podspec_file.version_value
12
+ end
13
+
14
+ #####################################################
15
+ # @!group Documentation
16
+ #####################################################
17
+
18
+ def self.description
19
+ "Receive the version number from a podspec file"
20
+ end
21
+
22
+ def self.available_options
23
+ [
24
+ FastlaneCore::ConfigItem.new(key: :path,
25
+ env_name: "FL_VERSION_PODSPEC_PATH",
26
+ description: "You must specify the path to the podspec file",
27
+ is_string: true,
28
+ default_value: Dir["*.podspec"].last,
29
+ verify_block: proc do |value|
30
+ raise "Please pass a path to the `version_get_podspec` action".red if value.length == 0
31
+ end)
32
+ ]
33
+ end
34
+
35
+ def self.output
36
+ [
37
+ ['PODSPEC_VERSION_NUMBER', 'The podspec version number']
38
+ ]
39
+ end
40
+
41
+ def self.authors
42
+ ["Liquidsoul", "KrauseFx"]
43
+ end
44
+
45
+ def self.is_supported?(platform)
46
+ true
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,19 @@
1
+ ### fastlane Helper
2
+
3
+ You can put shared code into this folder. Use this if you need to access the same code from multiple actions or to just clean up the actual action.
4
+
5
+ To create a new helper, duplicate the `podspec_helper.rb`, rename the class and put your code inside the class.
6
+
7
+ Make sure it's structured like this:
8
+
9
+ ```ruby
10
+ module Fastlane
11
+ module Helper
12
+ class PodspecHelper
13
+ ...
14
+ end
15
+ end
16
+ end
17
+ ```
18
+
19
+ The `git_helper` and `sh_helper` are different, please make sure to build something like `podspec_helper`.
@@ -0,0 +1,14 @@
1
+ module Fastlane
2
+ module Actions
3
+ # will make sure a gem is installed. If it's not an appropriate error message is shown
4
+ # this will *not* 'require' the gem
5
+ def self.verify_gem!(gem_name)
6
+ begin
7
+ Gem::Specification.find_by_name(gem_name)
8
+ rescue Gem::LoadError
9
+ raise "You have to install the `#{gem_name}` using `sudo gem install #{gem_name}` to use this action".red
10
+ end
11
+ true
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,60 @@
1
+ module Fastlane
2
+ module Helper
3
+ class PodspecHelper
4
+ attr_accessor :path
5
+ attr_accessor :podspec_content
6
+ attr_accessor :version_regex
7
+ attr_accessor :version_match
8
+ attr_accessor :version_value
9
+
10
+ def initialize(path = nil)
11
+ version_var_name = 'version'
12
+ @version_regex = /^(?<begin>[^#]*#{version_var_name}\s*=\s*['"])(?<value>(?<major>[0-9]+)(\.(?<minor>[0-9]+))?(\.(?<patch>[0-9]+))?)(?<end>['"])/i
13
+
14
+ return unless (path || '').length > 0
15
+ raise "Could not find podspec file at path '#{path}'".red unless File.exist?(path)
16
+
17
+ @path = File.expand_path(path)
18
+ podspec_content = File.read(path)
19
+
20
+ parse(podspec_content)
21
+ end
22
+
23
+ def parse(podspec_content)
24
+ @podspec_content = podspec_content
25
+ @version_match = @version_regex.match(@podspec_content)
26
+ raise "Could not find version in podspec content '#{@podspec_content}'".red if @version_match.nil?
27
+ @version_value = @version_match[:value]
28
+ end
29
+
30
+ def bump_version(bump_type)
31
+ major = version_match[:major].to_i
32
+ minor = version_match[:minor].to_i || 0
33
+ patch = version_match[:patch].to_i || 0
34
+
35
+ case bump_type
36
+ when 'patch'
37
+ patch += 1
38
+ when 'minor'
39
+ minor += 1
40
+ patch = 0
41
+ when 'major'
42
+ major += 1
43
+ minor = 0
44
+ patch = 0
45
+ end
46
+
47
+ @version_value = "#{major}.#{minor}.#{patch}"
48
+ end
49
+
50
+ def update_podspec(version = nil)
51
+ new_version = version || @version_value
52
+ updated_podspec_content = @podspec_content.gsub(@version_regex, "#{@version_match[:begin]}#{new_version}#{@version_match[:end]}")
53
+
54
+ File.open(podspec_path, "w") {|file| file.puts updated_podspec_content} unless Helper.test?
55
+
56
+ updated_podspec_content
57
+ end
58
+ end
59
+ end
60
+ end
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.25.1'
2
+ VERSION = '1.26.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.25.1
4
+ version: 1.26.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-10 00:00:00.000000000 Z
11
+ date: 2015-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -70,16 +70,22 @@ dependencies:
70
70
  name: xcodeproj
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.20'
76
+ - - "<"
77
+ - !ruby/object:Gem::Version
78
+ version: 1.0.0
76
79
  type: :runtime
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
- - - "~>"
83
+ - - ">="
81
84
  - !ruby/object:Gem::Version
82
85
  version: '0.20'
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: 1.0.0
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: xcpretty
85
91
  requirement: !ruby/object:Gem::Requirement
@@ -178,34 +184,6 @@ dependencies:
178
184
  - - "~>"
179
185
  - !ruby/object:Gem::Version
180
186
  version: 2.3.8
181
- - !ruby/object:Gem::Dependency
182
- name: artifactory
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '2.0'
188
- type: :runtime
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '2.0'
195
- - !ruby/object:Gem::Dependency
196
- name: slather
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '1.8'
202
- type: :runtime
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - "~>"
207
- - !ruby/object:Gem::Version
208
- version: '1.8'
209
187
  - !ruby/object:Gem::Dependency
210
188
  name: fastlane_core
211
189
  requirement: !ruby/object:Gem::Requirement
@@ -558,6 +536,48 @@ dependencies:
558
536
  - - "~>"
559
537
  - !ruby/object:Gem::Version
560
538
  version: '0.29'
539
+ - !ruby/object:Gem::Dependency
540
+ name: artifactory
541
+ requirement: !ruby/object:Gem::Requirement
542
+ requirements:
543
+ - - "~>"
544
+ - !ruby/object:Gem::Version
545
+ version: '2.0'
546
+ type: :development
547
+ prerelease: false
548
+ version_requirements: !ruby/object:Gem::Requirement
549
+ requirements:
550
+ - - "~>"
551
+ - !ruby/object:Gem::Version
552
+ version: '2.0'
553
+ - !ruby/object:Gem::Dependency
554
+ name: slather
555
+ requirement: !ruby/object:Gem::Requirement
556
+ requirements:
557
+ - - "~>"
558
+ - !ruby/object:Gem::Version
559
+ version: '1.8'
560
+ type: :development
561
+ prerelease: false
562
+ version_requirements: !ruby/object:Gem::Requirement
563
+ requirements:
564
+ - - "~>"
565
+ - !ruby/object:Gem::Version
566
+ version: '1.8'
567
+ - !ruby/object:Gem::Dependency
568
+ name: cocoapods
569
+ requirement: !ruby/object:Gem::Requirement
570
+ requirements:
571
+ - - "~>"
572
+ - !ruby/object:Gem::Version
573
+ version: 0.38.2
574
+ type: :development
575
+ prerelease: false
576
+ version_requirements: !ruby/object:Gem::Requirement
577
+ requirements:
578
+ - - "~>"
579
+ - !ruby/object:Gem::Version
580
+ version: 0.38.2
561
581
  description: Connect all iOS deployment tools into one streamlined workflow
562
582
  email:
563
583
  - fastlane@krausefx.com
@@ -600,6 +620,7 @@ files:
600
620
  - lib/fastlane/actions/delete_keychain.rb
601
621
  - lib/fastlane/actions/deliver.rb
602
622
  - lib/fastlane/actions/deploygate.rb
623
+ - lib/fastlane/actions/dotgpg_environment.rb
603
624
  - lib/fastlane/actions/download.rb
604
625
  - lib/fastlane/actions/dsym_zip.rb
605
626
  - lib/fastlane/actions/ensure_git_branch.rb
@@ -668,6 +689,8 @@ files:
668
689
  - lib/fastlane/actions/update_info_plist.rb
669
690
  - lib/fastlane/actions/update_project_code_signing.rb
670
691
  - lib/fastlane/actions/update_project_provisioning.rb
692
+ - lib/fastlane/actions/version_bump_podspec.rb
693
+ - lib/fastlane/actions/version_get_podspec_version.rb
671
694
  - lib/fastlane/actions/xcode_select.rb
672
695
  - lib/fastlane/actions/xcode_server_get_assets.rb
673
696
  - lib/fastlane/actions/xcodebuild.rb
@@ -681,7 +704,10 @@ files:
681
704
  - lib/fastlane/erb_template_helper.rb
682
705
  - lib/fastlane/fast_file.rb
683
706
  - lib/fastlane/fastlane_folder.rb
707
+ - lib/fastlane/helper/README.md
708
+ - lib/fastlane/helper/gem_helper.rb
684
709
  - lib/fastlane/helper/git_helper.rb
710
+ - lib/fastlane/helper/podspec_helper.rb
685
711
  - lib/fastlane/helper/sh_helper.rb
686
712
  - lib/fastlane/junit_generator.rb
687
713
  - lib/fastlane/lane.rb
@@ -712,7 +738,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
712
738
  version: '0'
713
739
  requirements: []
714
740
  rubyforge_project:
715
- rubygems_version: 2.4.5
741
+ rubygems_version: 2.4.6
716
742
  signing_key:
717
743
  specification_version: 4
718
744
  summary: Connect all iOS deployment tools into one streamlined workflow