fastlane 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +49 -6
- data/lib/fastlane/actions/actions_helper.rb +2 -3
- data/lib/fastlane/actions/crashlytics.rb +1 -1
- data/lib/fastlane/actions/deliver.rb +2 -2
- data/lib/fastlane/actions/deploygate.rb +87 -0
- data/lib/fastlane/actions/hipchat.rb +51 -10
- data/lib/fastlane/actions/hockey.rb +3 -0
- data/lib/fastlane/actions/ipa.rb +115 -0
- data/lib/fastlane/actions/slack.rb +23 -11
- data/lib/fastlane/actions/testmunk.rb +1 -1
- data/lib/fastlane/runner.rb +0 -1
- data/lib/fastlane/setup.rb +0 -8
- data/lib/fastlane/version.rb +1 -1
- metadata +4 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a3a2a536f09df1917c15ac5eb551e903fa0815a
|
4
|
+
data.tar.gz: b3ecbd749ccfd75580392fc72c840ef53e2a09a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61d77640d296490e31906cfd8d45d2ed879978b3bbab42cbdb8bcda580bea2085e75b1c0e896dfd484a3b5d3e721a24d5592fb8463371b6730fd71698aff7e02
|
7
|
+
data.tar.gz: e73b1d0d0c6ae17295abb670b49f9fe296312de7da4f2bfdabdd7d42a2d1a9e348ec956d94b876850facf90bbba7a7f0a1612dc491f4b0905281ac146c2b0d10
|
data/README.md
CHANGED
@@ -170,17 +170,36 @@ produce({
|
|
170
170
|
})
|
171
171
|
```
|
172
172
|
|
173
|
-
####
|
173
|
+
#### ipa
|
174
|
+
|
175
|
+
Build your app right inside `fastlane` and the path to the resulting ipa is automatically available to all other actions.
|
176
|
+
|
174
177
|
```ruby
|
175
|
-
|
178
|
+
ipa({
|
179
|
+
workspace: "MyApp.xcworkspace",
|
180
|
+
configuration: "Debug",
|
181
|
+
scheme: "Debug",
|
182
|
+
})
|
176
183
|
```
|
177
184
|
|
178
|
-
|
185
|
+
The path to the `ipa` is automatically used by `Crashlytics`, `Hockey` and `DeployGate`. To use also use it in `deliver` update your `Deliverfile`:
|
186
|
+
|
179
187
|
```ruby
|
180
|
-
|
188
|
+
ipa ENV["IPA_OUTPUT_PATH"]
|
189
|
+
beta_ipa ENV["IPA_OUTPUT_PATH"]
|
181
190
|
```
|
182
191
|
|
183
|
-
|
192
|
+
#### [deliver](https://github.com/KrauseFx/deliver)
|
193
|
+
```ruby
|
194
|
+
deliver
|
195
|
+
```
|
196
|
+
|
197
|
+
To upload a new build to TestFlight use ```deliver :beta```.
|
198
|
+
|
199
|
+
If you don't want a PDF report for App Store builds, append ```:force``` to the command. This is useful when running ```fastlane``` on your Continuous Integration server: `deliver :force`
|
200
|
+
|
201
|
+
Other options
|
202
|
+
|
184
203
|
- ```deliver :skip_deploy```: To don't submit the app for review (works with both App Store and beta builds)
|
185
204
|
- ```deliver :force, :skip_deploy```: Combine options using ```,```
|
186
205
|
|
@@ -227,6 +246,24 @@ crashlytics({
|
|
227
246
|
```
|
228
247
|
Additionally you can specify `notes_path`, `emails` and `groups`.
|
229
248
|
|
249
|
+
#### [DeployGate](https://deploygate.com/)
|
250
|
+
|
251
|
+
You can retrieve your username and API token on [your settings page](https://deploygate.com/settings).
|
252
|
+
|
253
|
+
```ruby
|
254
|
+
deploygate({
|
255
|
+
api_token: '...',
|
256
|
+
user: 'target username or organization name',
|
257
|
+
ipa: './ipa_file.ipa',
|
258
|
+
message: "Build #{Actions.lane_context[Actions::SharedValues::BUILD_NUMBER]}",
|
259
|
+
})
|
260
|
+
```
|
261
|
+
|
262
|
+
If you put `deploygate` after `ipa` action, you don't have to specify IPA file path, as it is extracted from the lane context automatically.
|
263
|
+
|
264
|
+
More information about the available options can be found in the [DeployGate Push API document](https://deploygate.com/docs/api).
|
265
|
+
|
266
|
+
|
230
267
|
#### [Slack](http://slack.com)
|
231
268
|
Send a message to **#channel** (by default) or a direct message to **@username** with success (green) or failure (red) status.
|
232
269
|
|
@@ -242,6 +279,9 @@ Send a message to **#channel** (by default) or a direct message to **@username**
|
|
242
279
|
Send a message to **room** (by default) or a direct message to **@username** with success (green) or failure (red) status.
|
243
280
|
|
244
281
|
```ruby
|
282
|
+
ENV["HIPCHAT_API_TOKEN"] = "Your API token"
|
283
|
+
ENV["HIPCHAT_API_VERSION"] = "1 for API version 1 or 2 for API version 2"
|
284
|
+
|
245
285
|
hipchat({
|
246
286
|
message: "App successfully released!",
|
247
287
|
channel: "Room or @username",
|
@@ -386,9 +426,12 @@ Available variables (put that inside the square brackets of the above snippet)
|
|
386
426
|
```ruby
|
387
427
|
Actions::SharedValues::BUILD_NUMBER # generated by `increment_build_number`
|
388
428
|
Actions::SharedValues::SNAPSHOT_SCREENSHOTS_PATH # generated by `snapshot`
|
389
|
-
Actions::SharedValues::
|
429
|
+
Actions::SharedValues::IPA_OUTPUT_PATH # generated by `ipa`
|
390
430
|
Actions::SharedValues::SIGH_PROFILE_PATH # generated by `sigh`
|
391
431
|
Actions::SharedValues::HOCKEY_DOWNLOAD_LINK #generated by `hockey`
|
432
|
+
Actions::SharedValues::DEPLOYGATE_URL # generated by `deploygate`
|
433
|
+
Actions::SharedValues::DEPLOYGATE_APP_REVISION # integer, generated by `deploygate`
|
434
|
+
Actions::SharedValues::DEPLOYGATE_APP_INFO # Hash, generated by `deploygate`
|
392
435
|
````
|
393
436
|
|
394
437
|
#### Complex Fastfile Example
|
@@ -4,7 +4,6 @@ module Fastlane
|
|
4
4
|
module Actions
|
5
5
|
module SharedValues
|
6
6
|
LANE_NAME = :LANE_NAME
|
7
|
-
START_TIME = :START_TIME
|
8
7
|
end
|
9
8
|
|
10
9
|
def self.executed_actions
|
@@ -67,10 +66,10 @@ module Fastlane
|
|
67
66
|
end
|
68
67
|
|
69
68
|
if $?.exitstatus.to_i != 0
|
70
|
-
raise "Exit status of command '#{command}' was #{$?.exitstatus.to_s} instead of 0.
|
69
|
+
raise "Exit status of command '#{command}' was #{$?.exitstatus.to_s} instead of 0. \n#{result}" # this will also append the output to the exception (for the Jenkins reports)
|
71
70
|
end
|
72
71
|
else
|
73
|
-
result << command # only
|
72
|
+
result << command # only for the tests
|
74
73
|
end
|
75
74
|
|
76
75
|
return result
|
@@ -16,7 +16,7 @@ module Fastlane
|
|
16
16
|
crashlytics_path = params[:crashlytics_path]
|
17
17
|
api_token = params[:api_token]
|
18
18
|
build_secret = params[:build_secret]
|
19
|
-
ipa_path = params[:ipa_path]
|
19
|
+
ipa_path = params[:ipa_path] || Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
|
20
20
|
notes_path = params[:notes_path]
|
21
21
|
emails = params[:emails]
|
22
22
|
groups = params[:groups]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Fastlane
|
2
2
|
module Actions
|
3
3
|
module SharedValues
|
4
|
-
|
4
|
+
|
5
5
|
end
|
6
6
|
|
7
7
|
class DeliverAction
|
@@ -20,7 +20,7 @@ module Fastlane
|
|
20
20
|
is_beta_ipa: beta,
|
21
21
|
skip_deploy: skip_deploy)
|
22
22
|
|
23
|
-
|
23
|
+
Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = ENV["DELIVER_IPA_PATH"] # deliver will store it in the environment
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# TODO: Workaround, since deploygate.rb from shenzhen includes the code for commander
|
2
|
+
def command(param)
|
3
|
+
end
|
4
|
+
|
5
|
+
module Fastlane
|
6
|
+
module Actions
|
7
|
+
module SharedValues
|
8
|
+
DEPLOYGATE_URL = :DEPLOYGATE_URL
|
9
|
+
DEPLOYGATE_REVISION = :DEPLOYGATE_REVISION # auto increment revision number
|
10
|
+
DEPLOYGATE_APP_INFO = :DEPLOYGATE_APP_INFO # contains app revision, bundle identifier, etc.
|
11
|
+
end
|
12
|
+
|
13
|
+
class DeploygateAction
|
14
|
+
DEPLOYGATE_URL_BASE = 'https://deploygate.com'
|
15
|
+
|
16
|
+
def self.run(params)
|
17
|
+
require 'shenzhen'
|
18
|
+
require 'shenzhen/plugins/deploygate'
|
19
|
+
|
20
|
+
# Available options: https://deploygate.com/docs/api
|
21
|
+
options = {
|
22
|
+
ipa: Actions.lane_context[SharedValues::IPA_OUTPUT_PATH],
|
23
|
+
}.merge(params.first || {})
|
24
|
+
assert_options!(options)
|
25
|
+
|
26
|
+
Helper.log.info "Starting with ipa upload to DeployGate... this could take some time ⏳".green
|
27
|
+
client = Shenzhen::Plugins::DeployGate::Client.new(
|
28
|
+
options.delete(:api_token),
|
29
|
+
options.delete(:user)
|
30
|
+
)
|
31
|
+
|
32
|
+
return if Helper.is_test?
|
33
|
+
|
34
|
+
response = client.upload_build(options.delete(:ipa), options)
|
35
|
+
if parse_response(response)
|
36
|
+
Helper.log.info "DeployGate URL: #{Actions.lane_context[SharedValues::DEPLOYGATE_URL]}"
|
37
|
+
Helper.log.info "Build successfully uploaded to DeployGate as revision \##{Actions.lane_context[SharedValues::DEPLOYGATE_REVISION]}!".green
|
38
|
+
else
|
39
|
+
raise "Error when trying to upload ipa to DeployGate".red
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
|
45
|
+
def self.assert_options!(options)
|
46
|
+
raise "No API Token for DeployGate given, pass using `api_token: 'token'`".red unless options[:api_token].to_s.length > 0
|
47
|
+
raise "No User for app given, pass using `user: 'user'`".red unless options[:user].to_s.length > 0
|
48
|
+
raise "No IPA file given or found, pass using `ipa: 'path.ipa'`".red unless options[:ipa]
|
49
|
+
raise "IPA file on path '#{File.expand_path(options[:ipa])}' not found".red unless File.exists?(options[:ipa])
|
50
|
+
end
|
51
|
+
|
52
|
+
def self.parse_response(response)
|
53
|
+
if response.body && response.body.key?('error')
|
54
|
+
unless response.body['error']
|
55
|
+
res = response.body['results']
|
56
|
+
url = DEPLOYGATE_URL_BASE + res['path']
|
57
|
+
|
58
|
+
Actions.lane_context[SharedValues::DEPLOYGATE_URL] = url
|
59
|
+
Actions.lane_context[SharedValues::DEPLOYGATE_REVISION] = res['revision']
|
60
|
+
Actions.lane_context[SharedValues::DEPLOYGATE_APP_INFO] = res
|
61
|
+
else
|
62
|
+
Helper.log.error "Error uploading to DeployGate: #{response.body['message']}".red
|
63
|
+
help_message(response)
|
64
|
+
return
|
65
|
+
end
|
66
|
+
else
|
67
|
+
Helper.log.fatal "Error uploading to DeployGate: #{response.body}".red
|
68
|
+
return
|
69
|
+
end
|
70
|
+
true
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.help_message(response)
|
74
|
+
message =
|
75
|
+
case response.body['message']
|
76
|
+
when 'you are not authenticated'
|
77
|
+
"Invalid API Token specified."
|
78
|
+
when 'application create error: permit'
|
79
|
+
"Access denied: May be trying to upload to wrong user or updating app you join as a tester?"
|
80
|
+
when 'application create error: limit'
|
81
|
+
"Plan limit: You have reached to the limit of current plan or your plan was expired."
|
82
|
+
end
|
83
|
+
Helper.log.error message.red if message
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
@@ -11,30 +11,71 @@ module Fastlane
|
|
11
11
|
channel: nil
|
12
12
|
}.merge(params.first || {})
|
13
13
|
|
14
|
-
require '
|
14
|
+
require 'net/http'
|
15
|
+
require 'uri'
|
15
16
|
|
16
17
|
api_token = ENV["HIPCHAT_API_TOKEN"]
|
18
|
+
api_version = ENV["HIPCHAT_API_VERSION"]
|
17
19
|
|
18
20
|
unless api_token
|
19
21
|
Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_TOKEN\"] = \"your token\"' to your Fastfile's `before_all` section.".red
|
20
22
|
raise "No HIPCHAT_API_TOKEN given.".red
|
21
23
|
end
|
24
|
+
if api_version.nil? or ![1,2].include?api_version[0].to_i
|
25
|
+
Helper.log.fatal "Please add 'ENV[\"HIPCHAT_API_VERSION\"] = \"1 or 2\"' to your Fastfile's `before_all` section.".red
|
26
|
+
raise "No HIPCHAT_API_VERSION given.".red
|
27
|
+
end
|
22
28
|
|
23
|
-
client = HipChat::Client.new(api_token, :api_version => 'v2')
|
24
29
|
channel = options[:channel]
|
25
30
|
color = (options[:success] ? 'green' : 'red')
|
31
|
+
message = "<table><tr><td><img src=\"https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png\" style=\"width:50px;height:auto\"></td><td>" + options[:message] + "</td></tr></table>"
|
26
32
|
|
27
|
-
if
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
33
|
+
if api_version.to_i == 1
|
34
|
+
########## running on V1 ##########
|
35
|
+
if isUser(channel)
|
36
|
+
raise "HipChat private message not working with API V1 please use API V2 instead".red
|
37
|
+
else
|
38
|
+
uri = URI.parse('https://api.hipchat.com/v1/rooms/message')
|
39
|
+
response = Net::HTTP.post_form(uri, {"from" => "fastlane", "auth_token" => api_token, "color" => color, "message_format" => "html", "room_id" => channel, "message" => message})
|
40
|
+
checkResponseCodeForRoom(response, channel)
|
41
|
+
end
|
32
42
|
else
|
33
|
-
|
34
|
-
|
35
|
-
|
43
|
+
########## running on V2 ##########
|
44
|
+
if isUser(channel)
|
45
|
+
channel.slice!(0)
|
46
|
+
params = {'message' => message, 'message_format' => 'html'}
|
47
|
+
json_headers = {"Content-Type" => "application/json",
|
48
|
+
"Accept" => "application/json", "Authorization" => "Bearer #{api_token}"}
|
49
|
+
|
50
|
+
uri = URI.parse("https://api.hipchat.com/v2/user/#{channel}/message")
|
51
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
52
|
+
http.use_ssl = true
|
53
|
+
|
54
|
+
response = http.post(uri.path, params.to_json, json_headers)
|
55
|
+
checkResponseCode(response, channel)
|
56
|
+
else
|
57
|
+
uri = URI.parse("https://api.hipchat.com/v2/room/#{channel}/notification")
|
58
|
+
response = Net::HTTP.post_form(uri, {"from" => "fastlane", "auth_token" => api_token, "color" => color, "message_format" => "html", "message" => message})
|
59
|
+
checkResponseCode(response, channel)
|
60
|
+
end
|
36
61
|
end
|
62
|
+
end
|
37
63
|
|
64
|
+
def self.isUser(channel)
|
65
|
+
return channel.to_s.start_with?('@')
|
66
|
+
end
|
67
|
+
|
68
|
+
def self.checkResponseCode(response, channel)
|
69
|
+
case response.code.to_i
|
70
|
+
when 200, 204
|
71
|
+
true
|
72
|
+
when 404
|
73
|
+
raise "Unknown #{channel}".red
|
74
|
+
when 401
|
75
|
+
raise "Access denied #{channel}".red
|
76
|
+
else
|
77
|
+
raise "Unexpected #{response.code} for `#{channel}'".red
|
78
|
+
end
|
38
79
|
end
|
39
80
|
end
|
40
81
|
end
|
@@ -18,6 +18,9 @@ module Fastlane
|
|
18
18
|
notify: 1
|
19
19
|
}.merge(params.first)
|
20
20
|
|
21
|
+
options[:ipa] ||= Actions.lane_context[SharedValues::IPA_OUTPUT_PATH]
|
22
|
+
options[:dsym] ||= Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH]
|
23
|
+
|
21
24
|
require 'shenzhen'
|
22
25
|
require 'shenzhen/plugins/hockeyapp'
|
23
26
|
|
@@ -0,0 +1,115 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Actions
|
3
|
+
|
4
|
+
module SharedValues
|
5
|
+
IPA_OUTPUT_PATH = :IPA_OUTPUT_PATH
|
6
|
+
DSYM_OUTPUT_PATH = :DSYM_OUTPUT_PATH
|
7
|
+
end
|
8
|
+
|
9
|
+
# -w, --workspace WORKSPACE Workspace (.xcworkspace) file to use to build app (automatically detected in current directory)
|
10
|
+
# -p, --project PROJECT Project (.xcodeproj) file to use to build app (automatically detected in current directory, overridden by --workspace option, if passed)
|
11
|
+
# -c, --configuration CONFIGURATION Configuration used to build
|
12
|
+
# -s, --scheme SCHEME Scheme used to build app
|
13
|
+
# --xcconfig XCCONFIG use an extra XCCONFIG file to build the app
|
14
|
+
# --xcargs XCARGS pass additional arguments to xcodebuild when building the app. Be sure to quote multiple args.
|
15
|
+
# --[no-]clean Clean project before building
|
16
|
+
# --[no-]archive Archive project after building
|
17
|
+
# -d, --destination DESTINATION Destination. Defaults to current directory
|
18
|
+
# -m, --embed PROVISION Sign .ipa file with .mobileprovision
|
19
|
+
# -i, --identity IDENTITY Identity to be used along with --embed
|
20
|
+
# --sdk SDK use SDK as the name or path of the base SDK when building the project
|
21
|
+
# --ipa IPA specify the name of the .ipa file to generate (including file extension)
|
22
|
+
|
23
|
+
ARGS_MAP = {
|
24
|
+
workspace: '-w',
|
25
|
+
project: '-p',
|
26
|
+
configuration: '-c',
|
27
|
+
scheme: '-s',
|
28
|
+
clean: '--clean',
|
29
|
+
archive: '--archive',
|
30
|
+
destination: '-d',
|
31
|
+
embed: '-m',
|
32
|
+
identity: '-i',
|
33
|
+
sdk: '--sdk',
|
34
|
+
ipa: '--ipa'
|
35
|
+
}
|
36
|
+
|
37
|
+
class IpaAction
|
38
|
+
def self.run(params)
|
39
|
+
|
40
|
+
# The args we will build with
|
41
|
+
build_args = nil
|
42
|
+
|
43
|
+
# The output directory of the IPA and dSYM
|
44
|
+
absolute_dest_directory = nil
|
45
|
+
|
46
|
+
# Allows for a whole variety of configurations
|
47
|
+
if params.first.is_a? Hash
|
48
|
+
|
49
|
+
# Used to get the final path of the IPA and dSYM
|
50
|
+
if dest = params.first[:destination]
|
51
|
+
absolute_dest_directory = Dir.glob(dest).map(&File.method(:realpath)).first
|
52
|
+
end
|
53
|
+
|
54
|
+
# Maps nice developer build parameters to Shenzhen args
|
55
|
+
build_args = params_to_build_args(params.first)
|
56
|
+
|
57
|
+
else
|
58
|
+
build_args = params
|
59
|
+
end
|
60
|
+
|
61
|
+
# If no dest directory given, default to current directory
|
62
|
+
absolute_dest_directory ||= Dir.pwd
|
63
|
+
|
64
|
+
if Helper.is_test?
|
65
|
+
Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = File.join(absolute_dest_directory, "test.ipa")
|
66
|
+
Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = File.join(absolute_dest_directory, "test.app.dSYM.zip")
|
67
|
+
return build_args
|
68
|
+
end
|
69
|
+
|
70
|
+
# Joins args into space delimited string
|
71
|
+
build_args = build_args.join(' ')
|
72
|
+
|
73
|
+
command = "ipa build #{build_args}"
|
74
|
+
Helper.log.debug command
|
75
|
+
Actions.sh command
|
76
|
+
|
77
|
+
# Finds absolute path of IPA and dSYM
|
78
|
+
absolute_ipa_path = find_ipa_file(absolute_dest_directory)
|
79
|
+
absolute_dsym_path = find_dsym_file(absolute_dest_directory)
|
80
|
+
|
81
|
+
# Sets shared values to use after this action is performed
|
82
|
+
Actions.lane_context[SharedValues::IPA_OUTPUT_PATH] = absolute_ipa_path
|
83
|
+
Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] = absolute_dsym_path
|
84
|
+
ENV[SharedValues::IPA_OUTPUT_PATH.to_s] = absolute_ipa_path # for deliver
|
85
|
+
ENV[SharedValues::DSYM_OUTPUT_PATH.to_s] = absolute_dsym_path
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.params_to_build_args(params)
|
89
|
+
# Remove nil value params unless :clean or :archive
|
90
|
+
params = params.delete_if { |k, v| (k != :clean && k != :archive ) && v.nil? }
|
91
|
+
|
92
|
+
# Maps nice developer param names to Shenzhen's `ipa build` arguments
|
93
|
+
params.collect do |k,v|
|
94
|
+
v ||= ''
|
95
|
+
if args = ARGS_MAP[k]
|
96
|
+
value = (v.to_s.length > 0 ? "\"#{v}\"" : "")
|
97
|
+
"#{ARGS_MAP[k]} #{value}".strip
|
98
|
+
end
|
99
|
+
end.compact
|
100
|
+
end
|
101
|
+
|
102
|
+
def self.find_ipa_file(dir)
|
103
|
+
# Finds last modified .ipa in the destination directory
|
104
|
+
Dir[File.join(dir, "*.ipa")].sort { |a,b| File.mtime(b) <=> File.mtime(a) }.first
|
105
|
+
end
|
106
|
+
|
107
|
+
def self.find_dsym_file(dir)
|
108
|
+
# Finds last modified .dSYM.zip in the destination directory
|
109
|
+
Dir[File.join(dir, "*.dSYM.zip")].sort { |a,b| File.mtime(b) <=> File.mtime(a) }.first
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
end
|
@@ -6,10 +6,10 @@ module Fastlane
|
|
6
6
|
|
7
7
|
class SlackAction
|
8
8
|
def self.git_branch
|
9
|
-
return
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
return ENV['GIT_BRANCH'] if ENV['GIT_BRANCH'].to_s.length > 0 # set by Jenkins
|
10
|
+
s = `git rev-parse --abbrev-ref HEAD`
|
11
|
+
return s if s.to_s.length > 0
|
12
|
+
return nil
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.git_author
|
@@ -21,12 +21,12 @@ module Fastlane
|
|
21
21
|
return nil
|
22
22
|
end
|
23
23
|
|
24
|
-
def self.
|
25
|
-
|
24
|
+
def self.last_git_commit
|
25
|
+
s = `git log -1 --pretty=%B`.strip
|
26
|
+
return s if s.to_s.length > 0
|
27
|
+
return nil
|
26
28
|
end
|
27
29
|
|
28
|
-
|
29
|
-
|
30
30
|
def self.run(params)
|
31
31
|
options = { message: '',
|
32
32
|
success: true,
|
@@ -79,10 +79,22 @@ module Fastlane
|
|
79
79
|
end
|
80
80
|
|
81
81
|
if git_author
|
82
|
+
if ENV["FASTLANE_SLACK_HIDE_AUTHOR_ON_SUCCESS"] and success
|
83
|
+
# We only show the git author if the build failed
|
84
|
+
else
|
85
|
+
test_result[:fields] << {
|
86
|
+
title: "Git Author",
|
87
|
+
value: git_author,
|
88
|
+
short: true
|
89
|
+
}
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
if last_git_commit
|
82
94
|
test_result[:fields] << {
|
83
|
-
title: "Git
|
84
|
-
value:
|
85
|
-
short:
|
95
|
+
title: "Git Commit",
|
96
|
+
value: last_git_commit,
|
97
|
+
short: false
|
86
98
|
}
|
87
99
|
end
|
88
100
|
|
@@ -21,7 +21,7 @@ module Fastlane
|
|
21
21
|
raise "Please pass your Testmunk API Key using `ENV['TESTMUNK_API'] = 'value'`" unless ENV['TESTMUNK_API']
|
22
22
|
raise "Please pass your Testmunk app name using `ENV['TESTMUNK_APP'] = 'value'`" unless ENV['TESTMUNK_APP']
|
23
23
|
|
24
|
-
ipa_path = ENV['TESTMUNK_IPA'] || ENV[Actions::SharedValues::
|
24
|
+
ipa_path = ENV['TESTMUNK_IPA'] || ENV[Actions::SharedValues::IPA_OUTPUT_PATH.to_s]
|
25
25
|
raise "Please pass a path to your ipa file using `ENV['TESTMUNK_IPA'] = 'value'`" unless ipa_path
|
26
26
|
|
27
27
|
Helper.log.info "Testmunk: Uploading the .ipa and starting your tests".green
|
data/lib/fastlane/runner.rb
CHANGED
data/lib/fastlane/setup.rb
CHANGED
@@ -103,14 +103,6 @@ module Fastlane
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
-
if @tools[:snapshot] and @tools[:deliver]
|
107
|
-
# Deliver is already installed
|
108
|
-
Helper.log.info "The 'screenshots' folder inside the 'deliver' folder will not be used.".yellow
|
109
|
-
Helper.log.info "Instead the 'screenshots' folder inside the 'fastlane' folder will be used.".yellow
|
110
|
-
Helper.log.info "Click Enter to confirm".green
|
111
|
-
STDIN.gets
|
112
|
-
end
|
113
|
-
|
114
106
|
if agree("Do you want to use 'sigh', which will maintain and download the provisioning profile for your app? (y/n)".yellow, true)
|
115
107
|
@tools[:sigh] = true
|
116
108
|
end
|
data/lib/fastlane/version.rb
CHANGED
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: 0.1.
|
4
|
+
version: 0.1.8
|
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-02-
|
11
|
+
date: 2015-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -108,20 +108,6 @@ dependencies:
|
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '1.0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: hipchat
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ~>
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '1.4'
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ~>
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '1.4'
|
125
111
|
- !ruby/object:Gem::Dependency
|
126
112
|
name: credentials_manager
|
127
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -337,11 +323,13 @@ files:
|
|
337
323
|
- lib/fastlane/actions/actions_helper.rb
|
338
324
|
- lib/fastlane/actions/crashlytics.rb
|
339
325
|
- lib/fastlane/actions/deliver.rb
|
326
|
+
- lib/fastlane/actions/deploygate.rb
|
340
327
|
- lib/fastlane/actions/frameit.rb
|
341
328
|
- lib/fastlane/actions/hipchat.rb
|
342
329
|
- lib/fastlane/actions/hockey.rb
|
343
330
|
- lib/fastlane/actions/increment_build_number.rb
|
344
331
|
- lib/fastlane/actions/install_cocapods.rb
|
332
|
+
- lib/fastlane/actions/ipa.rb
|
345
333
|
- lib/fastlane/actions/produce.rb
|
346
334
|
- lib/fastlane/actions/say.rb
|
347
335
|
- lib/fastlane/actions/sigh.rb
|