fastlane 0.6.1 → 0.7.0

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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/bin/fastlane +25 -7
  3. data/lib/assets/custom_action_template.rb +35 -2
  4. data/lib/fastlane.rb +1 -3
  5. data/lib/fastlane/action.rb +37 -0
  6. data/lib/fastlane/actions/{README → README.md} +1 -1
  7. data/lib/fastlane/actions/add_git_tag.rb +18 -1
  8. data/lib/fastlane/actions/cert.rb +38 -18
  9. data/lib/fastlane/actions/clean_build_artifacts.rb +9 -1
  10. data/lib/fastlane/actions/commit_version_bump.rb +16 -1
  11. data/lib/fastlane/actions/crashlytics.rb +21 -1
  12. data/lib/fastlane/actions/deliver.rb +31 -13
  13. data/lib/fastlane/actions/deploygate.rb +26 -1
  14. data/lib/fastlane/actions/ensure_git_status_clean.rb +15 -1
  15. data/lib/fastlane/actions/fastlane_version.rb +9 -1
  16. data/lib/fastlane/actions/frameit.rb +20 -10
  17. data/lib/fastlane/actions/gcovr.rb +35 -1
  18. data/lib/fastlane/actions/hipchat.rb +19 -1
  19. data/lib/fastlane/actions/hockey.rb +27 -1
  20. data/lib/fastlane/actions/increment_build_number.rb +22 -1
  21. data/lib/fastlane/actions/increment_version_number.rb +30 -1
  22. data/lib/fastlane/actions/install_carthage.rb +9 -1
  23. data/lib/fastlane/actions/install_cocapods.rb +5 -1
  24. data/lib/fastlane/actions/ipa.rb +52 -13
  25. data/lib/fastlane/actions/notify.rb +9 -1
  26. data/lib/fastlane/actions/produce.rb +50 -8
  27. data/lib/fastlane/actions/push_to_git_remote.rb +18 -1
  28. data/lib/fastlane/actions/register_devices.rb +18 -1
  29. data/lib/fastlane/actions/reset_git_repo.rb +24 -1
  30. data/lib/fastlane/actions/resign.rb +17 -1
  31. data/lib/fastlane/actions/s3.rb +30 -2
  32. data/lib/fastlane/actions/say.rb +5 -1
  33. data/lib/fastlane/actions/sigh.rb +22 -6
  34. data/lib/fastlane/actions/slack.rb +19 -4
  35. data/lib/fastlane/actions/snapshot.rb +27 -6
  36. data/lib/fastlane/actions/team_id.rb +9 -1
  37. data/lib/fastlane/actions/team_name.rb +9 -1
  38. data/lib/fastlane/actions/testmunk.rb +17 -4
  39. data/lib/fastlane/actions/typetalk.rb +19 -1
  40. data/lib/fastlane/actions/update_project_code_signing.rb +13 -1
  41. data/lib/fastlane/actions/xcode_select.rb +10 -2
  42. data/lib/fastlane/actions/xcodebuild.rb +88 -8
  43. data/lib/fastlane/actions/xctool.rb +16 -1
  44. data/lib/fastlane/actions_list.rb +130 -0
  45. data/lib/fastlane/core_ext/string.rb +8 -0
  46. data/lib/fastlane/lane_manager.rb +17 -1
  47. data/lib/fastlane/version.rb +1 -1
  48. metadata +35 -19
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb6a1aebf8e3b977e86df84f3bb4a35170c132bb
4
- data.tar.gz: ac8ee20aa0a9e140cbabc8347331e28e0bd5964e
3
+ metadata.gz: 5bfbf28d8f19dd00c13ed6c94a78879a606614eb
4
+ data.tar.gz: 1dab9f075c9f44962d58eb342fbc191e3832b925
5
5
  SHA512:
6
- metadata.gz: 85568340077223714e1f952300a53fdcc1bd47bf11e0be964c0c46c3d1087823aec7242b89413fd885df20431a61237f35eef140b85575158c9467187d69e007
7
- data.tar.gz: 5bd1d1c69a2a7e7c219bb2eaaa54c3a53bededee928a7a295257f7307d5f763a95c6e0612ad76eecab13ea894d9c01fcb44af74200b6c74b7bc478feeefa4608
6
+ metadata.gz: 07581ab17b99fa7e2257e7ad87e3da20eade8fe5de023c9fe11326d77ec8dcb76c5005b11f1a657a5e5ffd7079e3761f73185cbd590bd18c0b47a4a1e9a0438a
7
+ data.tar.gz: a42015506abdd38d372305c95a13cec5edf1f427008f10a3a7775bccd07c1087882c4577bf2ccc7ce97e0f6381f7e553f437806949c2fa30a0fdb2156876a00b
@@ -28,16 +28,12 @@ class FastlaneApplication
28
28
  c.option '--env STRING', String, 'Add environment to use with `dotenv`'
29
29
 
30
30
  c.action do |args, _options|
31
- FastlaneCore::UpdateChecker.start_looking_for_update('fastlane')
32
-
33
31
  if Fastlane::FastlaneFolder.path
34
32
  Fastlane::LaneManager.cruise_lanes(args, _options.env)
35
33
  else
36
34
  create = agree('Could not find fastlane in current directory. Would you like to set it up? (y/n)'.yellow, true)
37
35
  Fastlane::Setup.new.run if create
38
36
  end
39
-
40
- FastlaneCore::UpdateChecker.show_update_status('fastlane', Fastlane::VERSION)
41
37
  end
42
38
  end
43
39
 
@@ -46,9 +42,7 @@ class FastlaneApplication
46
42
  c.description = 'Helps you setting up fastlane based on your existing tools.'
47
43
 
48
44
  c.action do |_args, _options|
49
- FastlaneCore::UpdateChecker.start_looking_for_update('fastlane')
50
45
  Fastlane::Setup.new.run
51
- FastlaneCore::UpdateChecker.show_update_status('fastlane', Fastlane::VERSION)
52
46
  end
53
47
  end
54
48
 
@@ -61,10 +55,34 @@ class FastlaneApplication
61
55
  end
62
56
  end
63
57
 
58
+ command :actions do |c|
59
+ c.syntax = 'fastlane actions'
60
+ c.description = 'Lists all available fastlane actions'
61
+
62
+ c.action do |_args, _options|
63
+ require 'fastlane/actions_list'
64
+ Fastlane::ActionsList.run(_args.first)
65
+ end
66
+ end
67
+
68
+ command :action do |c|
69
+ c.syntax = 'fastlane action [tool_name]'
70
+ c.description = 'Shows more information for a specific command'
71
+ c.action do |_args, _options|
72
+ require 'fastlane/actions_list'
73
+ Fastlane::ActionsList.run(_args.first)
74
+ end
75
+ end
76
+
64
77
  default_command :run
65
78
 
66
79
  run!
67
80
  end
68
81
  end
69
82
 
70
- FastlaneApplication.new.run
83
+ begin
84
+ # FastlaneCore::UpdateChecker.start_looking_for_update('fastlane')
85
+ FastlaneApplication.new.run
86
+ ensure
87
+ FastlaneCore::UpdateChecker.show_update_status('fastlane', Fastlane::VERSION)
88
+ end
@@ -4,14 +4,47 @@ module Fastlane
4
4
  [[NAME_UP]]_CUSTOM_VALUE = :[[NAME_UP]]_CUSTOM_VALUE
5
5
  end
6
6
 
7
- class [[NAME_CLASS]]
7
+ class [[NAME_CLASS]] < Action
8
8
  def self.run(params)
9
9
  puts "My Ruby Code!"
10
- # puts "Parameter: #{params.first}"
10
+ # puts "Parameter Path: #{params[:first]}"
11
11
  # sh "shellcommand ./path"
12
12
 
13
13
  # Actions.lane_context[SharedValues::[[NAME_UP]]_CUSTOM_VALUE] = "my_val"
14
14
  end
15
+
16
+
17
+
18
+ #####################################################
19
+ # @!group Documentation
20
+ #####################################################
21
+
22
+ def self.description
23
+ "A short description with <= 80 characters of what this action does"
24
+ end
25
+
26
+ def self.available_options
27
+ # Define all options your action supports.
28
+ # The environment variable (last parameters) is optional, remove it if you don't need it
29
+ # You can add as many parameters as you want
30
+ [
31
+ ['path', 'Describe what this parameter is useful for', 'ENVIRONMENT_VARIABLE_NAME'],
32
+ ['second', 'Describe what this parameter is useful for']
33
+ ]
34
+ end
35
+
36
+ def self.output
37
+ # Define the shared values you are going to provide
38
+ # Example
39
+ [
40
+ ['[[NAME_UP]]_CUSTOM_VALUE', 'A description of what this value contains']
41
+ ]
42
+ end
43
+
44
+ def self.author
45
+ # So no one will ever forget your contribution to fastlane :) You are awesome btw!
46
+ '[Your GitHub Name]'
47
+ end
15
48
  end
16
49
  end
17
50
  end
@@ -7,13 +7,11 @@ require 'fastlane/setup'
7
7
  require 'fastlane/fastlane_folder'
8
8
  require 'fastlane/junit_generator'
9
9
  require 'fastlane/lane_manager'
10
+ require 'fastlane/action'
10
11
  require 'fastlane/actions/actions_helper'
11
12
 
12
13
  require 'fastlane_core'
13
14
 
14
- # Third Party code
15
- require 'colored'
16
-
17
15
  module Fastlane
18
16
  Helper = FastlaneCore::Helper # you gotta love Ruby: Helper.* should use the Helper class contained in FastlaneCore
19
17
 
@@ -0,0 +1,37 @@
1
+ module Fastlane
2
+ class Action
3
+ def self.run(params)
4
+
5
+ end
6
+
7
+ def self.description
8
+ "No description provided".red
9
+ end
10
+
11
+ def self.details
12
+ nil # this is your change to provide a more detailed description of this action
13
+ end
14
+
15
+ def self.available_options
16
+ # Return an array of 2-3 element arrays, like:
17
+ # [
18
+ # ['app_identifier', 'This value is responsible for X', 'ENVIRONMENT_VARIABLE'],
19
+ # ['app_identifier', 'This value is responsible for X']
20
+ # ]
21
+ # Take a look at sigh.rb if you're using the config manager of fastlane
22
+ nil
23
+ end
24
+
25
+ def self.output
26
+ # Return the keys you provide on the shared area
27
+ # [
28
+ # ['IPA_OUTPUT_PATH', 'The path to the newly generated ipa file']
29
+ # ]
30
+ nil
31
+ end
32
+
33
+ def self.author
34
+ "KrauseFx"
35
+ end
36
+ end
37
+ end
@@ -1,3 +1,3 @@
1
1
  All the methods, available for the lanes should be created here.
2
2
 
3
- ```fastlane``` will automatically detect the files in this folder
3
+ `fastlane` will automatically detect the files in this folder
@@ -1,7 +1,7 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  # Adds a git tag to the current commit
4
- class AddGitTagAction
4
+ class AddGitTagAction < Action
5
5
  def self.run(params)
6
6
  params = params.first
7
7
 
@@ -17,6 +17,23 @@ module Fastlane
17
17
  Helper.log.info 'Adding git tag "#{tag}" 🎯.'
18
18
  Actions.sh("git tag #{tag}")
19
19
  end
20
+
21
+ def self.description
22
+ "This will add a git tag to the current branch"
23
+ end
24
+
25
+ def self.available_options
26
+ [
27
+ ['tag', 'Define your own tag text. This will replace all other parameters.'],
28
+ ['grouping', 'Is used to keep your tags organised under one "folder". Defaults to "builds"'],
29
+ ['prefix', 'Anything you want to put in front of the version number (e.g. "v").'],
30
+ ['build_number', 'The build number. Defaults to the result of increment_build_number if you\'re using it']
31
+ ]
32
+ end
33
+
34
+ def self.author
35
+ "lmirosevic"
36
+ end
20
37
  end
21
38
  end
22
39
  end
@@ -5,38 +5,58 @@ module Fastlane
5
5
  CERT_CERTIFICATE_ID = :CERT_CERTIFICATE_ID
6
6
  end
7
7
 
8
- class CertAction
8
+ class CertAction < Action
9
9
  def self.run(params)
10
10
  require 'cert'
11
11
  require 'cert/options'
12
12
 
13
13
  return if Helper.test?
14
14
 
15
- Dir.chdir(FastlaneFolder.path || Dir.pwd) do
16
- # This should be executed in the fastlane folder
15
+ FastlaneCore::UpdateChecker.start_looking_for_update('cert')
17
16
 
18
- values = params.first
19
- unless values.kind_of?Hash
20
- # Old syntax
21
- values = {}
22
- params.each do |val|
23
- values[val] = true
17
+ begin
18
+ Dir.chdir(FastlaneFolder.path || Dir.pwd) do
19
+ # This should be executed in the fastlane folder
20
+
21
+ values = params.first
22
+ unless values.kind_of?Hash
23
+ # Old syntax
24
+ values = {}
25
+ params.each do |val|
26
+ values[val] = true
27
+ end
24
28
  end
25
- end
26
29
 
27
- Cert.config = FastlaneCore::Configuration.create(Cert::Options.available_options, (values || {}))
30
+ Cert.config = FastlaneCore::Configuration.create(Cert::Options.available_options, (values || {}))
28
31
 
29
- Cert::CertRunner.run
30
- cert_file_path = ENV["CER_FILE_PATH"]
31
- certificate_id = ENV["CER_CERTIFICATE_ID"]
32
- Actions.lane_context[SharedValues::CERT_FILE_PATH] = cert_file_path
33
- Actions.lane_context[SharedValues::CERT_CERTIFICATE_ID] = certificate_id
32
+ Cert::CertRunner.run
33
+ cert_file_path = ENV["CER_FILE_PATH"]
34
+ certificate_id = ENV["CER_CERTIFICATE_ID"]
35
+ Actions.lane_context[SharedValues::CERT_FILE_PATH] = cert_file_path
36
+ Actions.lane_context[SharedValues::CERT_CERTIFICATE_ID] = certificate_id
34
37
 
35
- Helper.log.info("Use signing certificate '#{certificate_id}' from now on!".green)
38
+ Helper.log.info("Use signing certificate '#{certificate_id}' from now on!".green)
36
39
 
37
- ENV["SIGH_CERTIFICATE_ID"] = certificate_id
40
+ ENV["SIGH_CERTIFICATE_ID"] = certificate_id
41
+ end
42
+ ensure
43
+ FastlaneCore::UpdateChecker.show_update_status('cert', Cert::VERSION)
38
44
  end
39
45
  end
46
+
47
+ def self.description
48
+ "Fetch or generate the latest available code signing identity"
49
+ end
50
+
51
+ def self.available_options
52
+ require 'cert'
53
+ require 'cert/options'
54
+ Cert::Options.available_options
55
+ end
56
+
57
+ def self.author
58
+ "KrauseFx"
59
+ end
40
60
  end
41
61
  end
42
62
  end
@@ -1,6 +1,6 @@
1
1
  module Fastlane
2
2
  module Actions
3
- class CleanBuildArtifactsAction
3
+ class CleanBuildArtifactsAction < Action
4
4
  def self.run(_params)
5
5
  [
6
6
  Actions.lane_context[Actions::SharedValues::IPA_OUTPUT_PATH],
@@ -10,6 +10,14 @@ module Fastlane
10
10
 
11
11
  Helper.log.info 'Cleaned up build artifacts 🐙'.green
12
12
  end
13
+
14
+ def self.description
15
+ "Deletes files created as result of running ipa or sigh"
16
+ end
17
+
18
+ def self.author
19
+ "lmirosevic"
20
+ end
13
21
  end
14
22
  end
15
23
  end
@@ -1,7 +1,7 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  # Commits the current changes in the repo as a version bump, checking to make sure only files which contain version information have been changed.
4
- class CommitVersionBumpAction
4
+ class CommitVersionBumpAction < Action
5
5
  def self.run(params)
6
6
  require 'xcodeproj'
7
7
  require 'pathname'
@@ -74,6 +74,21 @@ module Fastlane
74
74
 
75
75
  Helper.log.info "Committed \"#{commit_message}\" 💾.".green
76
76
  end
77
+
78
+ def self.description
79
+ "Creates a 'Version Bump' commit. Run after `increment_build_number`"
80
+ end
81
+
82
+ def self.available_options
83
+ [
84
+ ['message', 'The commit message. Defaults to "Version Bump"'],
85
+ ['xcodeproj', 'The path to your project file (Not the workspace). If you have only one, this is optional']
86
+ ]
87
+ end
88
+
89
+ def self.author
90
+ "lmirosevic"
91
+ end
77
92
  end
78
93
  end
79
94
  end
@@ -4,7 +4,7 @@ end
4
4
 
5
5
  module Fastlane
6
6
  module Actions
7
- class CrashlyticsAction
7
+ class CrashlyticsAction < Action
8
8
  def self.run(params)
9
9
  require 'shenzhen'
10
10
  require 'shenzhen/plugins/crashlytics'
@@ -83,6 +83,26 @@ module Fastlane
83
83
  raise "No IPA file given or found, pass using `ipa_path: 'path/app.ipa'`".red
84
84
  end
85
85
 
86
+ def self.description
87
+ "Upload a new build to Crashlytics Beta"
88
+ end
89
+
90
+ def self.available_options
91
+ [
92
+ ['crashlytics_path', 'Path to your Crashlytics bundle', 'CRASHLYTICS_FRAMEWORK_PATH'],
93
+ ['api_token', 'Crashlytics Beta API Token', 'CRASHLYTICS_API_TOKEN'],
94
+ ['build_secret', 'Crashlytics Build Secret', 'CRASHLYTICS_BUILD_SECRET'],
95
+ ['ipa_path', 'Path to your IPA file. Optional if you use the `ipa` or `xcodebuild` action'],
96
+ ['notes_path', 'Release Notes'],
97
+ ['emails', 'Pass email address'],
98
+ ['notifications', 'Crashlytics notification option']
99
+ ]
100
+ end
101
+
102
+ def self.author
103
+ "pedrogimenez"
104
+ end
105
+
86
106
  private_class_method :assert_params_given!,
87
107
  :assert_valid_params!,
88
108
  :assert_valid_crashlytics_path!,
@@ -3,29 +3,47 @@ module Fastlane
3
3
  module SharedValues
4
4
  end
5
5
 
6
- class DeliverAction
6
+ class DeliverAction < Action
7
7
  def self.run(params)
8
8
  require 'deliver'
9
9
 
10
10
  FastlaneCore::UpdateChecker.start_looking_for_update('deliver')
11
11
 
12
- ENV['DELIVER_SCREENSHOTS_PATH'] = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
12
+ begin
13
+ ENV['DELIVER_SCREENSHOTS_PATH'] = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
13
14
 
14
- force = params.include?(:force)
15
- beta = params.include?(:beta)
16
- skip_deploy = params.include?(:skip_deploy)
15
+ force = params.include?(:force)
16
+ beta = params.include?(:beta)
17
+ skip_deploy = params.include?(:skip_deploy)
17
18
 
18
- Dir.chdir(FastlaneFolder.path || Dir.pwd) do
19
- # This should be executed in the fastlane folder
20
- Deliver::Deliverer.new(nil,
21
- force: force,
22
- is_beta_ipa: beta,
23
- skip_deploy: skip_deploy)
19
+ Dir.chdir(FastlaneFolder.path || Dir.pwd) do
20
+ # This should be executed in the fastlane folder
21
+ Deliver::Deliverer.new(nil,
22
+ force: force,
23
+ is_beta_ipa: beta,
24
+ skip_deploy: skip_deploy)
24
25
 
25
- Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = File.expand_path(ENV['DELIVER_IPA_PATH']) # deliver will store it in the environment
26
+ Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = File.expand_path(ENV['DELIVER_IPA_PATH']) # deliver will store it in the environment
27
+ end
28
+ ensure
29
+ FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
26
30
  end
31
+ end
32
+
33
+ def self.description
34
+ "Uses deliver to upload new app metadata and builds to iTunes Connect"
35
+ end
36
+
37
+ def self.available_options
38
+ [
39
+ ['force', 'Set to true to skip PDF verification'],
40
+ ['beta', 'Upload a new version to TestFlight'],
41
+ ['skip_deploy', 'Skip the submission of the app - it will only be uploaded'],
42
+ ]
43
+ end
27
44
 
28
- FastlaneCore::UpdateChecker.show_update_status('deliver', Deliver::VERSION)
45
+ def self.author
46
+ "KrauseFx"
29
47
  end
30
48
  end
31
49
  end
@@ -10,7 +10,7 @@ module Fastlane
10
10
  DEPLOYGATE_APP_INFO = :DEPLOYGATE_APP_INFO # contains app revision, bundle identifier, etc.
11
11
  end
12
12
 
13
- class DeploygateAction
13
+ class DeploygateAction < Action
14
14
  DEPLOYGATE_URL_BASE = 'https://deploygate.com'
15
15
 
16
16
  def self.run(params)
@@ -83,6 +83,31 @@ module Fastlane
83
83
  Helper.log.error message.red if message
84
84
  end
85
85
  private_class_method :help_message
86
+
87
+ def self.description
88
+ "Upload a new build to DeployGate"
89
+ end
90
+
91
+ def self.available_options
92
+ [
93
+ ['api_token', 'DeployGate API Token'],
94
+ ['user', 'Target username or organization name'],
95
+ ['ipa', 'Path to your IPA file. Defaults to output of xcodebuild and ipa'],
96
+ ['message', 'Text for the uploaded build']
97
+ ]
98
+ end
99
+
100
+ def self.output
101
+ [
102
+ ['DEPLOYGATE_URL', 'URL of the newly uploaded build'],
103
+ ['DEPLOYGATE_REVISION', 'auto incremented revision number'],
104
+ ['DEPLOYGATE_APP_INFO', 'Contains app revision, bundle identifier, etc.']
105
+ ]
106
+ end
107
+
108
+ def self.author
109
+ "tnj"
110
+ end
86
111
  end
87
112
  end
88
113
  end