fastlane 0.10.0 → 0.11.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 (53) hide show
  1. checksums.yaml +4 -4
  2. data/bin/fastlane +10 -3
  3. data/lib/assets/FastfileTemplate +52 -46
  4. data/lib/fastlane.rb +1 -0
  5. data/lib/fastlane/action.rb +14 -0
  6. data/lib/fastlane/actions/actions_helper.rb +1 -0
  7. data/lib/fastlane/actions/add_git_tag.rb +4 -0
  8. data/lib/fastlane/actions/cert.rb +4 -0
  9. data/lib/fastlane/actions/clean_build_artifacts.rb +4 -0
  10. data/lib/fastlane/actions/commit_version_bump.rb +4 -0
  11. data/lib/fastlane/actions/crashlytics.rb +5 -0
  12. data/lib/fastlane/actions/default_platform.rb +31 -0
  13. data/lib/fastlane/actions/deliver.rb +4 -0
  14. data/lib/fastlane/actions/deploygate.rb +4 -0
  15. data/lib/fastlane/actions/ensure_git_status_clean.rb +4 -0
  16. data/lib/fastlane/actions/fastlane_version.rb +4 -0
  17. data/lib/fastlane/actions/frameit.rb +4 -0
  18. data/lib/fastlane/actions/gcovr.rb +4 -0
  19. data/lib/fastlane/actions/hipchat.rb +4 -0
  20. data/lib/fastlane/actions/hockey.rb +4 -0
  21. data/lib/fastlane/actions/increment_build_number.rb +4 -0
  22. data/lib/fastlane/actions/increment_version_number.rb +4 -0
  23. data/lib/fastlane/actions/install_carthage.rb +4 -0
  24. data/lib/fastlane/actions/install_cocapods.rb +4 -0
  25. data/lib/fastlane/actions/ipa.rb +10 -0
  26. data/lib/fastlane/actions/notify.rb +4 -0
  27. data/lib/fastlane/actions/opt_out_usage.rb +4 -0
  28. data/lib/fastlane/actions/pem.rb +4 -2
  29. data/lib/fastlane/actions/produce.rb +4 -0
  30. data/lib/fastlane/actions/push_to_git_remote.rb +4 -0
  31. data/lib/fastlane/actions/register_devices.rb +4 -0
  32. data/lib/fastlane/actions/reset_git_repo.rb +4 -0
  33. data/lib/fastlane/actions/resign.rb +4 -0
  34. data/lib/fastlane/actions/s3.rb +4 -0
  35. data/lib/fastlane/actions/say.rb +4 -0
  36. data/lib/fastlane/actions/sigh.rb +4 -0
  37. data/lib/fastlane/actions/slack.rb +79 -66
  38. data/lib/fastlane/actions/snapshot.rb +4 -0
  39. data/lib/fastlane/actions/team_id.rb +4 -0
  40. data/lib/fastlane/actions/team_name.rb +4 -0
  41. data/lib/fastlane/actions/testmunk.rb +4 -0
  42. data/lib/fastlane/actions/typetalk.rb +4 -0
  43. data/lib/fastlane/actions/update_project_code_signing.rb +4 -0
  44. data/lib/fastlane/actions/xcode_select.rb +4 -0
  45. data/lib/fastlane/actions/xcodebuild.rb +24 -0
  46. data/lib/fastlane/actions/xctool.rb +4 -0
  47. data/lib/fastlane/docs_generator.rb +37 -17
  48. data/lib/fastlane/fast_file.rb +100 -42
  49. data/lib/fastlane/lane_manager.rb +80 -40
  50. data/lib/fastlane/runner.rb +71 -27
  51. data/lib/fastlane/supported_platforms.rb +18 -0
  52. data/lib/fastlane/version.rb +1 -1
  53. metadata +6 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3d46e552444f395539b40e3b201837134fde1ac5
4
- data.tar.gz: 14a55931aaca6b1150256edbee47dba17d7af856
3
+ metadata.gz: 8cbac227e095ab139acfcf394f2607bb1da0ae82
4
+ data.tar.gz: 7f41df9446553d5c0bf1d1ead4a872cbdb169933
5
5
  SHA512:
6
- metadata.gz: c37d42dac1b8b79e94fa299074fc57330a83eb251c750af26cb078cc3af7e5fcc8a7ae39c26cbb9e61b325f99db6d0630ff1d0dd7c8850fbdb177cbc8e84abba
7
- data.tar.gz: d2e610df45533d281f3852528cf709314e45a7373593458e4244d1e289e867a31f9d798ab613b43a614b7b036c3c7364f284392a0e13f7f4395d24d47abc832d
6
+ metadata.gz: cffeeee93a8a855fb5f5c5dca44cba393c0304d4a2b9c79816ec4107835f997ae1112fd9b3f324a7a919a91a142cf7fb7f7685b246cb705239252ca35db13378
7
+ data.tar.gz: 1752557d250037e80eb7b583050aa24226cb1875d85420fd4b8cbe45a09fb73c5f9bd764f4e1eb7bb29723adf9777059d497bee919b4b5050998b3693412c78a
@@ -4,7 +4,6 @@ $LOAD_PATH.push File.expand_path('../../lib', __FILE__)
4
4
 
5
5
  require 'fastlane'
6
6
  require 'commander'
7
- require 'dotenv'
8
7
  require 'fastlane/new_action'
9
8
 
10
9
  HighLine.track_eof = false
@@ -24,12 +23,20 @@ class FastlaneApplication
24
23
 
25
24
  command :run do |c|
26
25
  c.syntax = 'fastlane run [lane]'
27
- c.description = 'Drive the fastlane for a specific environment.'
26
+ c.description = 'Drive the fastlane for a specific environment. Pass the lane name and optionally the platform first'
28
27
  c.option '--env STRING', String, 'Add environment to use with `dotenv`'
29
28
 
30
29
  c.action do |args, _options|
31
30
  if Fastlane::FastlaneFolder.path
32
- Fastlane::LaneManager.cruise_lanes(args, _options.env)
31
+ platform = nil
32
+ lane = args[1]
33
+ if lane
34
+ platform = args[0]
35
+ else
36
+ lane = args[0]
37
+ end
38
+
39
+ Fastlane::LaneManager.cruise_lane(platform, lane, _options.env)
33
40
  else
34
41
  create = agree('Could not find fastlane in current directory. Would you like to set it up? (y/n)'.yellow, true)
35
42
  Fastlane::Setup.new.run if create
@@ -1,5 +1,5 @@
1
1
  # Customise this file, documentation can be found here:
2
- # https://github.com/krausefx/fastlane#customise-the-fastfile
2
+ # https://github.com/KrauseFx/fastlane/tree/master/docs
3
3
 
4
4
  # Change the syntax highlighting to Ruby
5
5
  # All lines starting with a # are ignored when running `fastlane`
@@ -13,62 +13,68 @@
13
13
  # Update this, if you use features of a newer version
14
14
  fastlane_version "[[FASTLANE_VERSION]]"
15
15
 
16
- before_all do
17
- # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
16
+ default_platform :ios
18
17
 
19
- # sh "./customShellScript.sh"
20
18
 
21
- cocoapods
19
+ platform :ios do
22
20
 
23
- # increment_build_number
21
+ before_all do
22
+ # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
24
23
 
25
- ipa
24
+ cocoapods
26
25
 
27
- xctool
28
- end
26
+ # increment_build_number
29
27
 
30
- desc "Runs all the tests"
31
- lane :test do
32
- snapshot
33
- end
28
+ ipa
34
29
 
35
- desc "Submit a new Beta Build to Apple TestFlight"
36
- desc "This will also make sure the profile is up to date"
37
- lane :beta do
38
- snapshot
39
- sigh
40
- deliver :skip_deploy, :beta
41
- # sh "your_script.sh"
42
- # You can use other beta testing services here
43
- end
30
+ xctool
31
+ end
44
32
 
45
- desc "Deploy a new version to the App Store"
46
- desc "** Full Markdown** Support: `code`"
47
- lane :deploy do
48
- snapshot
49
- sigh
50
- deliver :skip_deploy, :force
51
- # frameit
52
- end
33
+ desc "Runs all the tests"
34
+ lane :test do
35
+ snapshot
36
+ end
53
37
 
54
- desc "In House Beta Enterprise Distribution"
55
- lane :inhouse do
56
- # insert your code here
57
- end
38
+ desc "Submit a new Beta Build to Apple TestFlight"
39
+ desc "This will also make sure the profile is up to date"
40
+ lane :beta do
41
+ snapshot
42
+ sigh
43
+ deliver :skip_deploy, :beta
58
44
 
59
- # You can define as many lanes as you want
45
+ # sh "your_script.sh"
46
+ # You can also use other beta testing services here
47
+ end
60
48
 
61
- after_all do |lane|
62
- # This block is called, only if the executed lane was successful
63
-
64
- # slack({
65
- # message: "Successfully deployed new App Update for [App](http://link.com).",
66
- # success: true,
67
- # channel: 'development'
68
- # })
69
- end
49
+ desc "Deploy a new version to the App Store"
50
+ desc "** Full Markdown** Support: `code`"
51
+ lane :deploy do
52
+ snapshot
53
+ sigh
54
+ deliver :skip_deploy, :force
55
+ # frameit
56
+ end
70
57
 
58
+ # You can define as many lanes as you want
59
+
60
+ after_all do |lane|
61
+ # This block is called, only if the executed lane was successful
62
+
63
+ # slack({
64
+ # message: "Successfully deployed new App Update."
65
+ # })
66
+ end
67
+
68
+
69
+ error do |lane, exception|
70
+ # slack({
71
+ # message: exception.message
72
+ # success: false
73
+ # })
74
+ end
71
75
 
72
- error do |lane, exception|
73
- # Something bad happened
74
76
  end
77
+
78
+
79
+ # More information about multiple platforms in fastlane:
80
+ # https://github.com/KrauseFx/fastlane/blob/master/docs/Platforms.md
@@ -10,6 +10,7 @@ require 'fastlane/lane_manager'
10
10
  require 'fastlane/action'
11
11
  require 'fastlane/actions/actions_helper'
12
12
  require 'fastlane/action_collector'
13
+ require 'fastlane/supported_platforms'
13
14
 
14
15
  require 'fastlane_core'
15
16
 
@@ -6,6 +6,7 @@ module Fastlane
6
6
 
7
7
  end
8
8
 
9
+ # Implement in subclasses
9
10
  def self.description
10
11
  "No description provided".red
11
12
  end
@@ -36,6 +37,19 @@ module Fastlane
36
37
  "KrauseFx"
37
38
  end
38
39
 
40
+ def self.is_supported?(platform)
41
+ # you do things like
42
+ # true
43
+ #
44
+ # platform == :ios
45
+ #
46
+ # [:ios, :android].include?platform
47
+ #
48
+ raise "Implementing `is_supported?` for all actions is mandatory. Please update #{self}".red
49
+ end
50
+
51
+
52
+
39
53
  # to allow a simple `sh` in the custom actions
40
54
  def self.sh(command)
41
55
  Fastlane::Actions.sh(command)
@@ -4,6 +4,7 @@ module Fastlane
4
4
  module Actions
5
5
  module SharedValues
6
6
  LANE_NAME = :LANE_NAME
7
+ PLATFORM_NAME = :PLATFORM_NAME
7
8
  ENVIRONMENT = :ENVIRONMENT
8
9
  end
9
10
 
@@ -34,6 +34,10 @@ module Fastlane
34
34
  def self.author
35
35
  "lmirosevic"
36
36
  end
37
+
38
+ def self.is_supported?(platform)
39
+ true
40
+ end
37
41
  end
38
42
  end
39
43
  end
@@ -57,6 +57,10 @@ module Fastlane
57
57
  def self.author
58
58
  "KrauseFx"
59
59
  end
60
+
61
+ def self.is_supported?(platform)
62
+ platform == :ios
63
+ end
60
64
  end
61
65
  end
62
66
  end
@@ -18,6 +18,10 @@ module Fastlane
18
18
  def self.author
19
19
  "lmirosevic"
20
20
  end
21
+
22
+ def self.is_supported?(platform)
23
+ platform == :ios
24
+ end
21
25
  end
22
26
  end
23
27
  end
@@ -89,6 +89,10 @@ module Fastlane
89
89
  def self.author
90
90
  "lmirosevic"
91
91
  end
92
+
93
+ def self.is_supported?(platform)
94
+ platform == :ios
95
+ end
92
96
  end
93
97
  end
94
98
  end
@@ -5,6 +5,11 @@ end
5
5
  module Fastlane
6
6
  module Actions
7
7
  class CrashlyticsAction < Action
8
+
9
+ def self.is_supported?(platform)
10
+ platform == :ios
11
+ end
12
+
8
13
  def self.run(params)
9
14
  require 'shenzhen'
10
15
  require 'shenzhen/plugins/crashlytics'
@@ -0,0 +1,31 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ DEFAULT_PLATFORM = :DEFAULT_PLATFORM
5
+ end
6
+
7
+ class DefaultPlatformAction < Action
8
+ def self.run(params)
9
+ raise "You forgot to pass the default platform".red if params.first.nil?
10
+
11
+ platform = params.first.to_sym
12
+
13
+ SupportedPlatforms.verify!platform
14
+
15
+ Actions.lane_context[SharedValues::DEFAULT_PLATFORM] = platform
16
+ end
17
+
18
+ def self.description
19
+ "Defines a default platform to not have to specify the platform"
20
+ end
21
+
22
+ def self.author
23
+ "KrauseFx"
24
+ end
25
+
26
+ def self.is_supported?(platform)
27
+ true
28
+ end
29
+ end
30
+ end
31
+ end
@@ -48,6 +48,10 @@ module Fastlane
48
48
  def self.author
49
49
  "KrauseFx"
50
50
  end
51
+
52
+ def self.is_supported?(platform)
53
+ platform == :ios
54
+ end
51
55
  end
52
56
  end
53
57
  end
@@ -13,6 +13,10 @@ module Fastlane
13
13
  class DeploygateAction < Action
14
14
  DEPLOYGATE_URL_BASE = 'https://deploygate.com'
15
15
 
16
+ def self.is_supported?(platform)
17
+ platform == :ios
18
+ end
19
+
16
20
  def self.run(params)
17
21
  require 'shenzhen'
18
22
  require 'shenzhen/plugins/deploygate'
@@ -30,6 +30,10 @@ module Fastlane
30
30
  def self.author
31
31
  "lmirosevic"
32
32
  end
33
+
34
+ def self.is_supported?(platform)
35
+ true
36
+ end
33
37
  end
34
38
  end
35
39
  end
@@ -27,6 +27,10 @@ module Fastlane
27
27
  def self.description
28
28
  "Verifies the minimum fastlane version required"
29
29
  end
30
+
31
+ def self.is_supported?(platform)
32
+ true
33
+ end
30
34
  end
31
35
  end
32
36
  end
@@ -29,6 +29,10 @@ module Fastlane
29
29
  def self.author
30
30
  "KrauseFx"
31
31
  end
32
+
33
+ def self.is_supported?(platform)
34
+ platform == :ios
35
+ end
32
36
  end
33
37
  end
34
38
  end
@@ -47,6 +47,10 @@ module Fastlane
47
47
  print_summary: "-s"
48
48
  }
49
49
 
50
+ def self.is_supported?(platform)
51
+ platform == :ios
52
+ end
53
+
50
54
  def self.run(params)
51
55
  unless Helper.test?
52
56
  raise "gcovr not installed".red if `which gcovr`.length == 0
@@ -105,6 +105,10 @@ module Fastlane
105
105
  def self.author
106
106
  "jingx23"
107
107
  end
108
+
109
+ def self.is_supported?(platform)
110
+ true
111
+ end
108
112
  end
109
113
  end
110
114
  end
@@ -89,6 +89,10 @@ module Fastlane
89
89
  def self.author
90
90
  "KrauseFx"
91
91
  end
92
+
93
+ def self.is_supported?(platform)
94
+ platform == :ios
95
+ end
92
96
  end
93
97
  end
94
98
  end
@@ -7,6 +7,10 @@ module Fastlane
7
7
  class IncrementBuildNumberAction < Action
8
8
  require 'shellwords'
9
9
 
10
+ def self.is_supported?(platform)
11
+ platform == :ios
12
+ end
13
+
10
14
  def self.run(params)
11
15
  # More information about how to set up your project and how it works:
12
16
  # https://developer.apple.com/library/ios/qa/qa1827/_index.html
@@ -7,6 +7,10 @@ module Fastlane
7
7
  class IncrementVersionNumberAction < Action
8
8
  require 'shellwords'
9
9
 
10
+ def self.is_supported?(platform)
11
+ platform == :ios
12
+ end
13
+
10
14
  def self.run(params)
11
15
  # More information about how to set up your project and how it works:
12
16
  # https://developer.apple.com/library/ios/qa/qa1827/_index.html
@@ -12,6 +12,10 @@ module Fastlane
12
12
  def self.author
13
13
  "bassrock"
14
14
  end
15
+
16
+ def self.is_supported?(platform)
17
+ platform == :ios
18
+ end
15
19
  end
16
20
  end
17
21
  end
@@ -8,6 +8,10 @@ module Fastlane
8
8
  def self.description
9
9
  "Runs `pod install` for the project"
10
10
  end
11
+
12
+ def self.is_supported?(platform)
13
+ platform == :ios
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -35,6 +35,12 @@ module Fastlane
35
35
  }
36
36
 
37
37
  class IpaAction < Action
38
+
39
+ def self.is_supported?(platform)
40
+ platform == :ios
41
+ end
42
+
43
+
38
44
  def self.run(params)
39
45
  # The args we will build with
40
46
  build_args = nil
@@ -59,6 +65,10 @@ module Fastlane
59
65
  build_args = params
60
66
  end
61
67
 
68
+ unless (params.first[:scheme] rescue nil)
69
+ Helper.log.warn "You haven't specified a scheme. This might cause problems. If you can't see any outupt, please pass a `scheme`"
70
+ end
71
+
62
72
  # If no dest directory given, default to current directory
63
73
  absolute_dest_directory ||= Dir.pwd
64
74