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
@@ -5,7 +5,7 @@ module Fastlane
5
5
  end
6
6
 
7
7
  # Raises an exception and stop the lane execution if the repo is not in a clean state
8
- class EnsureGitStatusCleanAction
8
+ class EnsureGitStatusCleanAction < Action
9
9
  def self.run(_params)
10
10
  repo_clean = `git status --porcelain`.empty?
11
11
 
@@ -16,6 +16,20 @@ module Fastlane
16
16
  raise 'Git repository is dirty! Please ensure the repo is in a clean state by commiting/stashing/discarding all changes first.'.red
17
17
  end
18
18
  end
19
+
20
+ def self.description
21
+ "Raises an exception if there are uncommited git changes"
22
+ end
23
+
24
+ def self.output
25
+ [
26
+ ['GIT_REPO_WAS_CLEAN_ON_START', 'Stores the fact that the git repo was clean at some point']
27
+ ]
28
+ end
29
+
30
+ def self.author
31
+ "lmirosevic"
32
+ end
19
33
  end
20
34
  end
21
35
  end
@@ -4,7 +4,7 @@ module Fastlane
4
4
 
5
5
  end
6
6
 
7
- class FastlaneVersionAction
7
+ class FastlaneVersionAction < Action
8
8
  def self.run(params)
9
9
  defined_version = ((Gem::Version.new(params.first) if params.first) rescue nil)
10
10
  raise "Please pass minimum fastlane version as parameter to fastlane_version".red unless defined_version
@@ -19,6 +19,14 @@ module Fastlane
19
19
  def self.step_text
20
20
  "Verifying required fastlane version"
21
21
  end
22
+
23
+ def self.author
24
+ "KrauseFx"
25
+ end
26
+
27
+ def self.description
28
+ "Verifies the minimum fastlane version required"
29
+ end
22
30
  end
23
31
  end
24
32
  end
@@ -1,24 +1,34 @@
1
1
  module Fastlane
2
2
  module Actions
3
- module SharedValues
4
- end
5
-
6
- class FrameitAction
3
+ class FrameitAction < Action
7
4
  def self.run(params)
8
5
  return if Helper.test?
9
6
 
10
7
  require 'frameit'
11
8
 
12
- color = Frameit::Editor::Color::BLACK
13
- color = Frameit::Editor::Color::SILVER if [:silver, :white].include?(params.first)
9
+ begin
10
+ FastlaneCore::UpdateChecker.start_looking_for_update('frameit')
11
+ color = Frameit::Editor::Color::BLACK
12
+ color = Frameit::Editor::Color::SILVER if [:silver, :white].include?(params.first)
14
13
 
15
- screenshots_folder = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
16
- screenshots_folder ||= FastlaneFolder.path
14
+ screenshots_folder = Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH]
15
+ screenshots_folder ||= FastlaneFolder.path
17
16
 
18
- Dir.chdir(screenshots_folder) do
19
- Frameit::Editor.new.run('.', color)
17
+ Dir.chdir(screenshots_folder) do
18
+ Frameit::Editor.new.run('.', color)
19
+ end
20
+ ensure
21
+ FastlaneCore::UpdateChecker.show_update_status('frameit', Frameit::VERSION)
20
22
  end
21
23
  end
24
+
25
+ def self.description
26
+ "Adds device frames around the screenshots using frameit"
27
+ end
28
+
29
+ def self.author
30
+ "KrauseFx"
31
+ end
22
32
  end
23
33
  end
24
34
  end
@@ -22,7 +22,7 @@ module Fastlane
22
22
  # -g, --use-gcov-files Use preprocessed gcov files for analysis.
23
23
  # -s, --print-summary Prints a small report to stdout with line & branch percentage coverage
24
24
 
25
- class GcovrAction
25
+ class GcovrAction < Action
26
26
  ARGS_MAP = {
27
27
  object_directory: "--object-directory",
28
28
  output: "-o",
@@ -101,6 +101,40 @@ module Fastlane
101
101
  end
102
102
  end.compact
103
103
  end
104
+
105
+ def self.description
106
+ "Runs test coverage reports for your Xcode project"
107
+ end
108
+
109
+ def self.available_options
110
+ [
111
+ ['object_directory', 'Specify the directory that contains the gcov data files.'],
112
+ ['output', 'Print output to this filename Keep the temporary *.gcov files generated by gcov.'],
113
+ ['keep', 'Keep the temporary *.gcov files generated by gcov.'],
114
+ ['delete', 'Delete the coverage files after they are processed.'],
115
+ ['filter', 'Keep only the data files that match this regular expression'],
116
+ ['exclude', 'Exclude data files that match this regular expression'],
117
+ ['gcov_filter', 'Keep only gcov data files that match this regular expression'],
118
+ ['gcov_exclude', 'Exclude gcov data files that match this regular expression'],
119
+ ['root', 'Defines the root directory for source files.'],
120
+ ['xml', 'Generate XML instead of the normal tabular output.'],
121
+ ['xml_pretty', 'Generate pretty XML instead of the normal dense format.'],
122
+ ['html', 'Generate HTML instead of the normal tabular output.'],
123
+ ['html_details', 'Generate HTML output for source file coverage.'],
124
+ ['html_absolute_paths', 'Set the paths in the HTML report to be absolute instead of relative'],
125
+ ['branches', 'Tabulate the branch coverage instead of the line coverage.'],
126
+ ['sort_uncovered', 'Sort entries by increasing number of uncovered lines.'],
127
+ ['sort_percentage', 'Sort entries by decreasing percentage of covered lines.'],
128
+ ['gcov_executable', 'Defines the name/path to the gcov executable].'],
129
+ ['exclude_unreachable_branches', 'Exclude from coverage branches which are marked to be excluded by LCOV/GCOV markers'],
130
+ ['use_gcov_files', 'Use preprocessed gcov files for analysis.'],
131
+ ['print_summary', 'Prints a small report to stdout with line & branch percentage coverage']
132
+ ]
133
+ end
134
+
135
+ def self.author
136
+ "dtrenz"
137
+ end
104
138
  end
105
139
  end
106
140
  end
@@ -3,7 +3,7 @@ module Fastlane
3
3
  module SharedValues
4
4
  end
5
5
 
6
- class HipchatAction
6
+ class HipchatAction < Action
7
7
  def self.run(params)
8
8
  options = { message: '',
9
9
  success: true,
@@ -87,6 +87,24 @@ module Fastlane
87
87
  raise "Unexpected #{response.code} for `#{channel}'".red
88
88
  end
89
89
  end
90
+
91
+ def self.description
92
+ "Send a error/success message to HipChat"
93
+ end
94
+
95
+ def self.available_options
96
+ [
97
+ ['', 'Hipchat API Token', 'HIPCHAT_API_TOKEN'],
98
+ ['', 'Version of the Hipchat API. Must be 1 or 2', 'HIPCHAT_API_VERSION'],
99
+ ['message', 'The message to post on HipChat'],
100
+ ['channel', 'The room or @username'],
101
+ ['success', 'Is this a success message?'],
102
+ ]
103
+ end
104
+
105
+ def self.author
106
+ "jingx23"
107
+ end
90
108
  end
91
109
  end
92
110
  end
@@ -9,7 +9,7 @@ module Fastlane
9
9
  HOCKEY_BUILD_INFORMATION = :HOCKEY_BUILD_INFORMATION # contains all keys/values from the HockeyApp API, like :title, :bundle_identifier
10
10
  end
11
11
 
12
- class HockeyAction
12
+ class HockeyAction < Action
13
13
  def self.run(params)
14
14
  # Available options: http://support.hockeyapp.net/kb/api/api-versions#upload-version
15
15
  options = {
@@ -63,6 +63,32 @@ module Fastlane
63
63
  raise 'Error when trying to upload ipa to HockeyApp'.red
64
64
  end
65
65
  end
66
+
67
+ def self.description
68
+ "Upload a new build to HockeyApp"
69
+ end
70
+
71
+ def self.available_options
72
+ [
73
+ ['api_token', 'API Token for Hockey Access'],
74
+ ['ipa', 'Path to the ipa file. Optional if you use the `ipa` or `xcodebuild` action'],
75
+ ['notes', 'The changelog for this build'],
76
+ ['dsym', 'Path to the dsym file. Optional if you use the `ipa` or `xcodebuild` action'],
77
+ ['status', 'No description'],
78
+ ['notify', 'Notify testers? 1 for yes'],
79
+ ]
80
+ end
81
+
82
+ def output
83
+ [
84
+ ['HOCKEY_DOWNLOAD_LINK', 'The newly generated download link for this build'],
85
+ ['HOCKEY_BUILD_INFORMATION', 'contains all keys/values from the HockeyApp API, like :title, :bundle_identifier']
86
+ ]
87
+ end
88
+
89
+ def self.author
90
+ "KrauseFx"
91
+ end
66
92
  end
67
93
  end
68
94
  end
@@ -4,7 +4,7 @@ module Fastlane
4
4
  BUILD_NUMBER = :BUILD_NUMBER
5
5
  end
6
6
 
7
- class IncrementBuildNumberAction
7
+ class IncrementBuildNumberAction < Action
8
8
  require 'shellwords'
9
9
 
10
10
  def self.run(params)
@@ -55,6 +55,27 @@ module Fastlane
55
55
  raise ex
56
56
  end
57
57
  end
58
+
59
+ def self.description
60
+ "Increment the build number of your project"
61
+ end
62
+
63
+ def self.available_options
64
+ [
65
+ ['build_number', 'specify specific build number (optional, omitting it increments by one)'],
66
+ ['xcodeproj', 'optional, you must specify the path to your main Xcode project if it is not in the project root directory']
67
+ ]
68
+ end
69
+
70
+ def self.output
71
+ [
72
+ ['BUILD_NUMBER', 'The new build number']
73
+ ]
74
+ end
75
+
76
+ def self.author
77
+ "KrauseFx"
78
+ end
58
79
  end
59
80
  end
60
81
  end
@@ -4,7 +4,7 @@ module Fastlane
4
4
  VERSION_NUMBER = :VERSION_NUMBER
5
5
  end
6
6
 
7
- class IncrementVersionNumberAction
7
+ class IncrementVersionNumberAction < Action
8
8
  require 'shellwords'
9
9
 
10
10
  def self.run(params)
@@ -93,6 +93,35 @@ module Fastlane
93
93
  raise ex
94
94
  end
95
95
  end
96
+
97
+ def self.description
98
+ "Increment the build number of your project"
99
+ end
100
+
101
+ def self.details
102
+ [
103
+ "This action will increment the version number. ",
104
+ "You first have to set up your Xcode project, if you haven't done it already:",
105
+ "https://developer.apple.com/library/ios/qa/qa1827/_index.html"
106
+ ].join(' ')
107
+ end
108
+
109
+ def self.available_options
110
+ [
111
+ ['build_number', 'specify specific build number (optional, omitting it increments by one)'],
112
+ ['xcodeproj', 'optional, you must specify the path to your main Xcode project if it is not in the project root directory']
113
+ ]
114
+ end
115
+
116
+ def self.output
117
+ [
118
+ ['VERSION_NUMBER', 'The new version number']
119
+ ]
120
+ end
121
+
122
+ def self.author
123
+ "serluca"
124
+ end
96
125
  end
97
126
  end
98
127
  end
@@ -1,9 +1,17 @@
1
1
  module Fastlane
2
2
  module Actions
3
- class CarthageAction
3
+ class CarthageAction < Action
4
4
  def self.run(_params)
5
5
  Actions.sh('carthage bootstrap')
6
6
  end
7
+
8
+ def self.description
9
+ "Runs `carthage bootstrap` for your project"
10
+ end
11
+
12
+ def self.author
13
+ "bassrock"
14
+ end
7
15
  end
8
16
  end
9
17
  end
@@ -1,9 +1,13 @@
1
1
  module Fastlane
2
2
  module Actions
3
- class CocoapodsAction
3
+ class CocoapodsAction < Action
4
4
  def self.run(_params)
5
5
  Actions.sh('pod install')
6
6
  end
7
+
8
+ def self.description
9
+ "Runs `pod install` for the project"
10
+ end
7
11
  end
8
12
  end
9
13
  end
@@ -5,19 +5,19 @@ module Fastlane
5
5
  DSYM_OUTPUT_PATH = :DSYM_OUTPUT_PATH
6
6
  end
7
7
 
8
- # -w, --workspace WORKSPACE Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)
9
- # -p, --project PROJECT Project (.xcodeproj) file to use to build app (automatically detected in current directory, overridden by --workspace option, if passed)
8
+ # -w, --workspace WORKSPACE Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)
9
+ # -p, --project PROJECT Project (.xcodeproj) file to use to build app (automatically detected in current directory, overridden by --workspace option, if passed)
10
10
  # -c, --configuration CONFIGURATION Configuration used to build
11
- # -s, --scheme SCHEME Scheme used to build app
12
- # --xcconfig XCCONFIG use an extra XCCONFIG file to build the app
13
- # --xcargs XCARGS pass additional arguments to xcodebuild when building the app. Be sure to quote multiple args.
14
- # --[no-]clean Clean project before building
15
- # --[no-]archive Archive project after building
16
- # -d, --destination DESTINATION Destination. Defaults to current directory
17
- # -m, --embed PROVISION Sign .ipa file with .mobileprovision
18
- # -i, --identity IDENTITY Identity to be used along with --embed
19
- # --sdk SDK use SDK as the name or path of the base SDK when building the project
20
- # --ipa IPA specify the name of the .ipa file to generate (including file extension)
11
+ # -s, --scheme SCHEME Scheme used to build app
12
+ # --xcconfig XCCONFIG use an extra XCCONFIG file to build the app
13
+ # --xcargs XCARGS pass additional arguments to xcodebuild when building the app. Be sure to quote multiple args.
14
+ # --[no-]clean Clean project before building
15
+ # --[no-]archive Archive project after building
16
+ # -d, --destination DESTINATION Destination. Defaults to current directory
17
+ # -m, --embed PROVISION Sign .ipa file with .mobileprovision
18
+ # -i, --identity IDENTITY Identity to be used along with --embed
19
+ # --sdk SDK use SDK as the name or path of the base SDK when building the project
20
+ # --ipa IPA specify the name of the .ipa file to generate (including file extension)
21
21
 
22
22
  ARGS_MAP = {
23
23
  workspace: '-w',
@@ -35,7 +35,7 @@ module Fastlane
35
35
  xcargs: '--xcargs',
36
36
  }
37
37
 
38
- class IpaAction
38
+ class IpaAction < Action
39
39
  def self.run(params)
40
40
  # The args we will build with
41
41
  build_args = nil
@@ -122,6 +122,45 @@ module Fastlane
122
122
  # Finds last modified .dSYM.zip in the destination directory
123
123
  Dir[File.join(dir, '*.dSYM.zip')].sort { |a, b| File.mtime(b) <=> File.mtime(a) }.first
124
124
  end
125
+
126
+ def self.description
127
+ "Easily build and sign your app using shenzhen"
128
+ end
129
+
130
+ def self.details
131
+ [
132
+ "More information on the shenzhen project page: https://github.com/nomad/shenzhen"
133
+ ].join(' ')
134
+ end
135
+
136
+ def self.available_options
137
+ [
138
+ ['workspace', 'Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)'],
139
+ ['project', 'Project (.xcodeproj) file to use to build app (automatically detected in current directory'],
140
+ ['configuration', 'Configuration used to build'],
141
+ ['scheme', 'Scheme used to build app'],
142
+ ['clean', 'use an extra XCCONFIG file to build the app'],
143
+ ['archive', 'pass additional arguments to xcodebuild when building the app. Be sure to quote multiple args.'],
144
+ ['destination', 'Clean project before building'],
145
+ ['embed', 'Archive project after building'],
146
+ ['identity', 'Destination. Defaults to current directory'],
147
+ ['sdk', 'Sign .ipa file with .mobileprovision'],
148
+ ['ipa', 'Identity to be used along with --embed'],
149
+ ['verbose', 'use SDK as the name or path of the base SDK when building the project'],
150
+ ['xcargs', 'specify the name of the .ipa file to generate (including file extension)']
151
+ ]
152
+ end
153
+
154
+ def self.output
155
+ [
156
+ ['IPA_OUTPUT_PATH', 'The path to the newly generated ipa file'],
157
+ ['DSYM_OUTPUT_PATH', 'The path to the dsym file']
158
+ ]
159
+ end
160
+
161
+ def self.author
162
+ "joshdholtz"
163
+ end
125
164
  end
126
165
  end
127
166
  end
@@ -1,12 +1,20 @@
1
1
  module Fastlane
2
2
  module Actions
3
- class NotifyAction
3
+ class NotifyAction < Action
4
4
  def self.run(params)
5
5
  require 'terminal-notifier'
6
6
 
7
7
  text = params.join(' ')
8
8
  TerminalNotifier.notify(text, title: 'fastlane')
9
9
  end
10
+
11
+ def self.description
12
+ "Shows a Mac OS X notification"
13
+ end
14
+
15
+ def author
16
+ "champo"
17
+ end
10
18
  end
11
19
  end
12
20
  end