fastlane 1.50.0 → 1.51.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: b69af193f8f343d463084053f99cf7033fe950af
4
- data.tar.gz: a7cdc51b53c41cc4417ae6ed04e109da631b9302
3
+ metadata.gz: 425eade5eb4d86ec9e784f5fe925bc3cd11e9ea7
4
+ data.tar.gz: d7b3dd59c112dbc7fe07d800d5c6d067e880640b
5
5
  SHA512:
6
- metadata.gz: 7e0d1526fe9adbc0613d598579dd90649d3464174f45b81789ee9a0f4823329f107239b8949fcf8cc4e375b505e69a865d8fd6019f1a89f995126195ea520fac
7
- data.tar.gz: ea78c80e80f86407e82bc20abb3af414346bd4955537f0d229368be82776b781cfc7d4e3910b2918b2b94637158ff1b1d8c5d3cfd2178ace5fe1df22d933a6e2
6
+ metadata.gz: f883a21a5c848f2f78709ac09990d1bb3337f9500bcf01338fd8c6227a577fa5c8e03a431b6326a36b7c4ad25a6487df7e62ad485a39b89ddfd065bd23bea1a3
7
+ data.tar.gz: 3f51fd1a89aed0babac095dd93544774733c0637d80e31cffa3d348658a81188288e38fbc18e2c0214c022c05af93698f8c4b320991dafe3275ede59ac7cd07a
data/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
  fastlane
22
22
  ============
23
23
 
24
- [![Twitter: @KauseFx](https://img.shields.io/badge/contact-@FastlaneTools-blue.svg?style=flat)](https://twitter.com/FastlaneTools)
24
+ [![Twitter: @FastlaneTools](https://img.shields.io/badge/contact-@FastlaneTools-blue.svg?style=flat)](https://twitter.com/FastlaneTools)
25
25
  [![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/fastlane/fastlane/blob/master/LICENSE)
26
26
  [![Gem](https://img.shields.io/gem/v/fastlane.svg?style=flat)](http://rubygems.org/gems/fastlane)
27
27
  [![Build Status](https://img.shields.io/travis/fastlane/fastlane/master.svg?style=flat)](https://travis-ci.org/fastlane/fastlane)
@@ -0,0 +1,67 @@
1
+ module Fastlane
2
+ module Actions
3
+ class BadgeAction < Action
4
+ def self.run(params)
5
+ require 'badge'
6
+ Badge::Runner.new.run('.', params[:dark], params[:custom], params[:no_badge], params[:shield])
7
+ end
8
+
9
+ #####################################################
10
+ # @!group Documentation
11
+ #####################################################
12
+
13
+ def self.description
14
+ "Automatically add a badge to your iOS app icon"
15
+ end
16
+
17
+ def self.details
18
+ [
19
+ "This action will add a light/dark beta badge onto your app icon.",
20
+ "You can also provide your custom badge/overlay or add an shield for more customization more info:",
21
+ "https://github.com/HazAT/badge"
22
+ ].join("\n")
23
+ end
24
+
25
+ def self.available_options
26
+ [
27
+ FastlaneCore::ConfigItem.new(key: :dark,
28
+ env_name: "FL_BADGE_DARK",
29
+ description: "adds a dark flavored badge ontop of your icon",
30
+ optional: true,
31
+ is_string: false,
32
+ verify_block: proc do |value|
33
+ raise "dark is only a flag and should always be true".red unless value == true
34
+ end),
35
+ FastlaneCore::ConfigItem.new(key: :custom,
36
+ env_name: "FL_BADGE_CUSTOM",
37
+ description: "add your custom overlay/badge image",
38
+ optional: true,
39
+ verify_block: proc do |value|
40
+ raise "custom should be a valid file path".red unless value and File.exist?(value)
41
+ end),
42
+ FastlaneCore::ConfigItem.new(key: :no_badge,
43
+ env_name: "FL_BADGE_NO_BADGE",
44
+ description: "hides the beta badge",
45
+ optional: true,
46
+ is_string: false,
47
+ verify_block: proc do |value|
48
+ raise "no_badge is only a flag and should always be true".red unless value == true
49
+ end),
50
+ FastlaneCore::ConfigItem.new(key: :shield,
51
+ env_name: "FL_BADGE_SHIELD",
52
+ description: "add a shield to your app icon from shield.io",
53
+ optional: true,
54
+ is_string: true)
55
+ ]
56
+ end
57
+
58
+ def self.authors
59
+ ["DanielGri"]
60
+ end
61
+
62
+ def self.is_supported?(platform)
63
+ platform == :ios
64
+ end
65
+ end
66
+ end
67
+ end
@@ -48,6 +48,7 @@ module Fastlane
48
48
  is_string: false,
49
49
  verify_block: proc do |value|
50
50
  raise ":between must be of type array".red unless value.kind_of?(Array)
51
+ raise ":between must not contain nil values".red if value.any?(&:nil?)
51
52
  raise ":between must be an array of size 2".red unless (value || []).size == 2
52
53
  end),
53
54
  FastlaneCore::ConfigItem.new(key: :pretty,
@@ -0,0 +1,72 @@
1
+ module Fastlane
2
+ module Actions
3
+ class ClocAction < Action
4
+ def self.run(params)
5
+ cloc_binary = params[:binary_path]
6
+ exclude_dirs = params[:exclude_dir].nil? ? '' : "--exclude-dir=#{params[:exclude_dir]}"
7
+ xml_format = params[:xml]
8
+ out_dir = params[:output_directory]
9
+ output_file = xml_format ? "#{out_dir}/cloc.xml" : "#{out_dir}/cloc.txt"
10
+ source_directory = params[:source_directory]
11
+
12
+ command = [
13
+ cloc_binary,
14
+ exclude_dirs,
15
+ '--by-file',
16
+ xml_format ? '--xml ' : '',
17
+ "--out=#{output_file}",
18
+ source_directory
19
+ ].join(' ').strip
20
+
21
+ Actions.sh command
22
+ end
23
+
24
+ def self.description
25
+ "Generates a Code Count that can be read by Jenkins (xml format)"
26
+ end
27
+
28
+ def self.details
29
+ "This action will run cloc to generate a SLOC report that the Jenkins SLOCCount plugin can read. See https://wiki.jenkins-ci.org/display/JENKINS/SLOCCount+Plugin for more information."
30
+ end
31
+
32
+ def self.available_options
33
+ [
34
+ FastlaneCore::ConfigItem.new(key: :binary_path,
35
+ env_name: "FL_CLOC_BINARY_PATH",
36
+ description: "Where the cloc binary lives on your system (full path including 'cloc')",
37
+ optional: true,
38
+ is_string: true,
39
+ default_value: '/usr/local/bin/cloc'),
40
+ FastlaneCore::ConfigItem.new(key: :exclude_dir,
41
+ env_name: "FL_CLOC_EXCLUDE_DIR",
42
+ description: "Comma separated list of directories to exclude", # a short description of this parameter
43
+ optional: true,
44
+ is_string: true),
45
+ FastlaneCore::ConfigItem.new(key: :output_directory,
46
+ env_name: "FL_CLOC_OUTPUT_DIRECTORY",
47
+ description: "Where to put the generated report file",
48
+ is_string: true,
49
+ default_value: "build"),
50
+ FastlaneCore::ConfigItem.new(key: :source_directory,
51
+ env_name: "FL_CLOC_SOURCE_DIRECTORY",
52
+ description: "Where to look for the source code (relative to the project root folder)",
53
+ is_string: true,
54
+ default_value: ""),
55
+ FastlaneCore::ConfigItem.new(key: :xml,
56
+ env_name: "FL_CLOC_XML",
57
+ description: "Should we generate an XML File (if false, it will generate a plain text file)?",
58
+ is_string: false,
59
+ default_value: true)
60
+ ]
61
+ end
62
+
63
+ def self.authors
64
+ ["intere"]
65
+ end
66
+
67
+ def self.is_supported?(platform)
68
+ [:ios, :mac].include?(platform)
69
+ end
70
+ end
71
+ end
72
+ end
@@ -0,0 +1,92 @@
1
+ require 'credentials_manager'
2
+
3
+ module Fastlane
4
+ module Actions
5
+ module SharedValues
6
+ LATEST_TESTFLIGHT_BUILD_NUMBER = :LATEST_TESTFLIGHT_BUILD_NUMBER
7
+ end
8
+
9
+ class LatestTestflightBuildNumberAction < Action
10
+
11
+ def self.run(params)
12
+ require 'spaceship'
13
+
14
+ credentials = CredentialsManager::AccountManager.new(user: params[:username])
15
+ Spaceship::Tunes.login(credentials.user, credentials.password)
16
+ Spaceship::Tunes.select_team
17
+ app = Spaceship::Tunes::Application.find(params[:app_identifier])
18
+
19
+ version_number = params[:version]
20
+ unless version_number
21
+ # Automatically fetch the latest version in testflight
22
+ if app.build_trains.keys.last
23
+ version_number = app.build_trains.keys.last
24
+ else
25
+ Helper.log.info "You have to specify a new version number: "
26
+ version_number = STDIN.gets.strip
27
+ end
28
+ end
29
+
30
+ Helper.log.info "Fetching the latest build number for version #{version_number}"
31
+
32
+ train = app.build_trains[version_number]
33
+ build_number = train.builds.map(&:build_version).map(&:to_i).sort.last
34
+
35
+ Helper.log.info "Latest upload is build number: #{build_number}"
36
+ Actions.lane_context[SharedValues::LATEST_TESTFLIGHT_BUILD_NUMBER] = build_number
37
+ end
38
+
39
+ #####################################################
40
+ # @!group Documentation
41
+ #####################################################
42
+
43
+ def self.description
44
+ "Fetches most recent build number from TestFlight"
45
+ end
46
+
47
+ def self.details
48
+ "Provides a way to have increment_build_number base the incremented value on the latest value in iTunesConnect by looking up the latest version in TestFlight and the latest build number for that version"
49
+ end
50
+
51
+ def self.available_options
52
+ user = CredentialsManager::AppfileConfig.try_fetch_value(:itunes_connect_id)
53
+ user ||= CredentialsManager::AppfileConfig.try_fetch_value(:apple_id)
54
+
55
+ [
56
+ FastlaneCore::ConfigItem.new(key: :app_identifier,
57
+ short_option: "-a",
58
+ env_name: "FASTLANE_APP_IDENTIFIER",
59
+ description: "The bundle identifier of your app",
60
+ default_value: CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier)),
61
+ FastlaneCore::ConfigItem.new(key: :username,
62
+ short_option: "-u",
63
+ env_name: "ITUNESCONNECT_USER",
64
+ description: "Your Apple ID Username",
65
+ default_value: user),
66
+ FastlaneCore::ConfigItem.new(key: :version,
67
+ env_name: "LATEST_VERSION",
68
+ description: "The version number whose latest build number we want",
69
+ optional: true)
70
+ ]
71
+ end
72
+
73
+ def self.output
74
+ [
75
+ ['LATEST_TESTFLIGHT_BUILD_NUMBER', 'The latest build number of the latest version of the app uploaded to TestFlight']
76
+ ]
77
+ end
78
+
79
+ def self.return_value
80
+ "Integer representation of the latest build number uploaded to TestFlight"
81
+ end
82
+
83
+ def self.authors
84
+ ["daveanderson"]
85
+ end
86
+
87
+ def self.is_supported?(platform)
88
+ platform == :ios
89
+ end
90
+ end
91
+ end
92
+ end
@@ -46,6 +46,11 @@ module Fastlane
46
46
  FastlaneCore::ConfigItem.new(key: :to,
47
47
  env_name: "MAILGUN_TO",
48
48
  description: "Destination of your mail"),
49
+ FastlaneCore::ConfigItem.new(key: :from,
50
+ env_name: "MAILGUN_FROM",
51
+ optional: true,
52
+ description: "Mailgun sender name",
53
+ default_value: "Mailgun Sandbox"),
49
54
  FastlaneCore::ConfigItem.new(key: :message,
50
55
  env_name: "MAILGUN_MESSAGE",
51
56
  description: "Message of your mail"),
@@ -90,7 +95,7 @@ module Fastlane
90
95
  def self.mailgunit(options)
91
96
  sandbox_domain = options[:postmaster].split("@").last
92
97
  RestClient.post "https://api:#{options[:apikey]}@api.mailgun.net/v3/#{sandbox_domain}/messages",
93
- from: "Mailgun Sandbox<#{options[:postmaster]}>",
98
+ from: "#{options[:from]}<#{options[:postmaster]}>",
94
99
  to: "#{options[:to]}",
95
100
  subject: options[:subject],
96
101
  html: mail_teplate(options)
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.50.0'
2
+ VERSION = '1.51.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.50.0
4
+ version: 1.51.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: 2016-01-12 00:00:00.000000000 Z
11
+ date: 2016-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: krausefx-shenzhen
@@ -148,7 +148,7 @@ dependencies:
148
148
  requirements:
149
149
  - - ">="
150
150
  - !ruby/object:Gem::Version
151
- version: 0.32.1
151
+ version: 0.33.0
152
152
  - - "<"
153
153
  - !ruby/object:Gem::Version
154
154
  version: 1.0.0
@@ -158,7 +158,7 @@ dependencies:
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
- version: 0.32.1
161
+ version: 0.33.0
162
162
  - - "<"
163
163
  - !ruby/object:Gem::Version
164
164
  version: 1.0.0
@@ -188,7 +188,7 @@ dependencies:
188
188
  requirements:
189
189
  - - ">="
190
190
  - !ruby/object:Gem::Version
191
- version: 0.19.0
191
+ version: 0.19.1
192
192
  - - "<"
193
193
  - !ruby/object:Gem::Version
194
194
  version: 1.0.0
@@ -198,7 +198,7 @@ dependencies:
198
198
  requirements:
199
199
  - - ">="
200
200
  - !ruby/object:Gem::Version
201
- version: 0.19.0
201
+ version: 0.19.1
202
202
  - - "<"
203
203
  - !ruby/object:Gem::Version
204
204
  version: 1.0.0
@@ -603,6 +603,7 @@ files:
603
603
  - lib/fastlane/actions/artifactory.rb
604
604
  - lib/fastlane/actions/backup_file.rb
605
605
  - lib/fastlane/actions/backup_xcarchive.rb
606
+ - lib/fastlane/actions/badge.rb
606
607
  - lib/fastlane/actions/bundle_install.rb
607
608
  - lib/fastlane/actions/carthage.rb
608
609
  - lib/fastlane/actions/cert.rb
@@ -612,6 +613,7 @@ files:
612
613
  - lib/fastlane/actions/clean_cocoapods_cache.rb
613
614
  - lib/fastlane/actions/clear_derived_data.rb
614
615
  - lib/fastlane/actions/clipboard.rb
616
+ - lib/fastlane/actions/cloc.rb
615
617
  - lib/fastlane/actions/cocoapods.rb
616
618
  - lib/fastlane/actions/commit_version_bump.rb
617
619
  - lib/fastlane/actions/copy_artifacts.rb
@@ -661,6 +663,7 @@ files:
661
663
  - lib/fastlane/actions/lane_context.rb
662
664
  - lib/fastlane/actions/last_git_commit.rb
663
665
  - lib/fastlane/actions/last_git_tag.rb
666
+ - lib/fastlane/actions/latest_testflight_build_number.rb
664
667
  - lib/fastlane/actions/lcov.rb
665
668
  - lib/fastlane/actions/mailgun.rb
666
669
  - lib/fastlane/actions/match.rb