fastlane 0.1.13 → 0.1.14

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: 54f331869a82dce0b638a3a76d1436c114652c87
4
- data.tar.gz: 833ad058aa09d7a110e1d56175edcab170162148
3
+ metadata.gz: c9362a03f17ecdd50e5cbd66cca7b9636fd0ccca
4
+ data.tar.gz: 3014751b36275dcff7750f3da20746d0a6894a06
5
5
  SHA512:
6
- metadata.gz: 163e20b524347beb310020b7b12a9746161dba2a29f68f5dcb4c9a7ef6120609eb0094d5985e432d198396e6622570e67becf18c827a498febec8716f6cec9d8
7
- data.tar.gz: 3cb37fa75820957a512affb767ff60dec4aedcc3e93abab00bdc7173d6a811dbaf68217a258413ed149b9e6df4748e397191e20f67aa3fc6eb418d52666d6727
6
+ metadata.gz: a88f86e177fb496c58173a0caf04a398bcb4fb731627b0c43088a9fbc1000d9ab2ad0b6155669d2f3c2388286f23e7e0f639f27fbbc6adf7b0e3d42cef1c7765
7
+ data.tar.gz: ea3d14f4461eb3cf625e7a3a2e6c3e8d8695dde55b30a9860168b3bf2d300b1326ac53c71c1fc336c96bc110ac498e64230b39eb1b30f4d77a62c4b10026db82
data/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
  <img src="assets/fastlane_text.png" alt="fastlane Logo" />
3
3
  </h3>
4
4
  <p align="center">
5
- <a href="https://github.com/KrauseFx/deliver">deliver</a> &bull;
6
- <a href="https://github.com/KrauseFx/snapshot">snapshot</a> &bull;
7
- <a href="https://github.com/KrauseFx/frameit">frameit</a> &bull;
8
- <a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
9
- <a href="https://github.com/KrauseFx/sigh">sigh</a> &bull;
5
+ <a href="https://github.com/KrauseFx/deliver">deliver</a> &bull;
6
+ <a href="https://github.com/KrauseFx/snapshot">snapshot</a> &bull;
7
+ <a href="https://github.com/KrauseFx/frameit">frameit</a> &bull;
8
+ <a href="https://github.com/KrauseFx/PEM">PEM</a> &bull;
9
+ <a href="https://github.com/KrauseFx/sigh">sigh</a> &bull;
10
10
  <a href="https://github.com/KrauseFx/produce">produce</a> &bull;
11
11
  <a href="https://github.com/KrauseFx/cert">cert</a> &bull;
12
12
  <a href="https://github.com/KrauseFx/codes">codes</a>
@@ -28,13 +28,13 @@ Get in contact with the developer on Twitter: [@KrauseFx](https://twitter.com/Kr
28
28
 
29
29
  -------
30
30
  <p align="center">
31
- <a href="#features">Features</a> &bull;
32
- <a href="#installation">Installation</a> &bull;
33
- <a href="#quick-start">Quick Start</a> &bull;
34
- <a href="#customise-the-fastfile">Customise</a> &bull;
35
- <a href="#extensions">Extensions</a> &bull;
36
- <a href="#jenkins-integration">Jenkins</a> &bull;
37
- <a href="#tips">Tips</a> &bull;
31
+ <a href="#features">Features</a> &bull;
32
+ <a href="#installation">Installation</a> &bull;
33
+ <a href="#quick-start">Quick Start</a> &bull;
34
+ <a href="#customise-the-fastfile">Customise</a> &bull;
35
+ <a href="#extensions">Extensions</a> &bull;
36
+ <a href="#jenkins-integration">Jenkins</a> &bull;
37
+ <a href="#tips">Tips</a> &bull;
38
38
  <a href="#need-help">Need help?</a>
39
39
  </p>
40
40
 
@@ -126,7 +126,7 @@ When one command fails, the execution will be aborted.
126
126
  There are some predefined actions you can use. If you have ideas for more, please let me know.
127
127
 
128
128
  #### [CocoaPods](http://cocoapods.org)
129
- Everyone using [CocoaPods](http://cocoapods.org) will probably want to run a ```pod install``` before running tests and building the app.
129
+ Everyone using [CocoaPods](http://cocoapods.org) will probably want to run a ```pod install``` before running tests and building the app.
130
130
  ```ruby
131
131
  cocoapods # this will run pod install
132
132
  ```
@@ -311,6 +311,19 @@ Send a message to **room** (by default) or a direct message to **@username** wit
311
311
  })
312
312
  ```
313
313
 
314
+ #### [Typetalk](https://typetalk.in/)
315
+ Send a message to **topic** with success (:smile:) or failure (:rage:) status.
316
+ [Using Bot's Typetalk Token](https://developer.nulab-inc.com/docs/typetalk/auth#tttoken)
317
+
318
+ ```ruby
319
+ typetalk({
320
+ message: "App successfully released!",
321
+ topicId: 1,
322
+ success: true,
323
+ typetalk_token: 'Your Typetalk Token'
324
+ })
325
+ ```
326
+
314
327
  #### [Testmunk](http://testmunk.com)
315
328
  Run your functional tests on real iOS devices over the cloud (for free on an iPod). With this simple [testcase](https://github.com/testmunk/TMSample/blob/master/testcases/smoke/smoke_features.zip) you can ensure your app launches and there is no crash at launch. Tests can be extended with [Testmunk's library](http://docs.testmunk.com/en/latest/steps.html) or custom steps. More details about this action can be found in [`testmunk.rb`](https://github.com/KrauseFx/fastlane/blob/master/lib/fastlane/actions/testmunk.rb).
316
329
  ```ruby
@@ -319,6 +332,17 @@ ENV['TESTMUNK_EMAIL'] = 'email@email.com'
319
332
  testmunk
320
333
  ```
321
334
 
335
+ #### [gcovr](http://gcovr.com/)
336
+ Generate summarized code coverage reports.
337
+
338
+ ```ruby
339
+ gcovr({
340
+ html: true,
341
+ html_details: true,
342
+ output: "./code-coverage/report.html"
343
+ })
344
+ ```
345
+
322
346
  #### Custom Shell Scripts
323
347
  ```ruby
324
348
  sh "./your_bash_script.sh"
@@ -349,7 +373,7 @@ end
349
373
  ```
350
374
 
351
375
  ### *error* block
352
- This block will get executed when an error occurs, in any of the blocks (*before_all*, the lane itself or *after_all*).
376
+ This block will get executed when an error occurs, in any of the blocks (*before_all*, the lane itself or *after_all*).
353
377
  ```ruby
354
378
  error do |lane, exception|
355
379
  slack({
@@ -372,7 +396,7 @@ If you think your extension can be used by other developers as well, let me know
372
396
 
373
397
  # Jenkins Integration
374
398
 
375
- `fastlane` automatically generates a JUnit report for you. This allows Continuous Integration systems, like `Jenkins`, access the results of your deployment.
399
+ `fastlane` automatically generates a JUnit report for you. This allows Continuous Integration systems, like `Jenkins`, access the results of your deployment.
376
400
 
377
401
  ## Installation
378
402
  The recommended way to install [Jenkins](http://jenkins-ci.org/) is through [homebrew](http://brew.sh/):
@@ -388,7 +412,7 @@ To store the password in the Keychain of your remote machine, I recommend runnin
388
412
 
389
413
  ## Deploy Strategy
390
414
 
391
- You should **not** deploy a new App Store update after every commit, since you still have to wait 1-2 weeks for the review. Instead I recommend using Git Tags, or custom triggers to deploy a new update.
415
+ You should **not** deploy a new App Store update after every commit, since you still have to wait 1-2 weeks for the review. Instead I recommend using Git Tags, or custom triggers to deploy a new update.
392
416
 
393
417
  You can set up your own ```Release``` job, which is only triggered manually.
394
418
 
@@ -422,7 +446,7 @@ To show the **generated screenhots** right in `Jenkins`
422
446
  - *HTML directory to archive*: `fastlane/screenshots`
423
447
  - *Index page*: `screenshots.html`
424
448
 
425
- Save and run. The result should look like this:
449
+ Save and run. The result should look like this:
426
450
 
427
451
  ![JenkinsIntegration](assets/JenkinsIntegration.png)
428
452
 
@@ -443,7 +467,7 @@ Save and run. The result should look like this:
443
467
 
444
468
  ## Advanced
445
469
  #### Lane Context
446
- The different actions can *communicate* with each other using a shared hash.
470
+ The different actions can *communicate* with each other using a shared hash.
447
471
  Access them in your scrips using:
448
472
  ```ruby
449
473
  Actions.lane_context[Actions::SharedValues::LANE_NAME] # the name of the current lane
@@ -539,7 +563,7 @@ fastlane test inhouse appstore
539
563
  Keep in mind the ```before_all``` and ```after_all``` block will be executed for each of the ```lanes```.
540
564
 
541
565
  #### Hide the `fastlane` folder
542
- Just rename the folder to `.fastlane` in case you don't want it to be visible in the Finder.
566
+ Just rename the folder to `.fastlane` in case you don't want it to be visible in the Finder.
543
567
 
544
568
  #### Select Xcode version (e.g. Beta Version)
545
569
  If you want to use a Beta Xcode installation, you can add this to your `before_all` block.
@@ -0,0 +1,106 @@
1
+ module Fastlane
2
+ module Actions
3
+ # --object-directory=OBJDIR Specify the directory that contains the gcov data files.
4
+ # -o OUTPUT, --output=OUTPUT Print output to this filename Keep the temporary *.gcov files generated by gcov.
5
+ # -k, --keep Keep the temporary *.gcov files generated by gcov.
6
+ # -d, --delete Delete the coverage files after they are processed.
7
+ # -f FILTER, --filter=FILTER Keep only the data files that match this regular expression
8
+ # -e EXCLUDE, --exclude=EXCLUDE Exclude data files that match this regular expression
9
+ # --gcov-filter=GCOV_FILTER Keep only gcov data files that match this regular expression
10
+ # --gcov-exclude=GCOV_EXCLUDE Exclude gcov data files that match this regular expression
11
+ # -r ROOT, --root=ROOT Defines the root directory for source files.
12
+ # -x, --xml Generate XML instead of the normal tabular output.
13
+ # --xml-pretty Generate pretty XML instead of the normal dense format.
14
+ # --html Generate HTML instead of the normal tabular output.
15
+ # --html-details Generate HTML output for source file coverage.
16
+ # --html-absolute-paths Set the paths in the HTML report to be absolute instead of relative
17
+ # -b, --branches Tabulate the branch coverage instead of the line coverage.
18
+ # -u, --sort-uncovered Sort entries by increasing number of uncovered lines.
19
+ # -p, --sort-percentage Sort entries by decreasing percentage of covered lines.
20
+ # --gcov-executable=GCOV_CMD Defines the name/path to the gcov executable [defaults to the GCOV environment variable, if present; else 'gcov'].
21
+ # --exclude-unreachable-branches Exclude from coverage branches which are marked to be excluded by LCOV/GCOV markers or are determined to be from lines containing only compiler-generated "dead" code.
22
+ # -g, --use-gcov-files Use preprocessed gcov files for analysis.
23
+ # -s, --print-summary Prints a small report to stdout with line & branch percentage coverage
24
+
25
+ class GcovrAction
26
+ ARGS_MAP = {
27
+ object_directory: "--object-directory",
28
+ output: "-o",
29
+ keep: "-k",
30
+ delete: "-d",
31
+ filter: "-f",
32
+ exclude: "-e",
33
+ gcov_filter: "--gcov-filter",
34
+ gcov_exclude: "--gcov-exclude",
35
+ root: "-r",
36
+ xml: "-x",
37
+ xml_pretty: "--xml-pretty",
38
+ html: "--html",
39
+ html_details: "--html-details",
40
+ html_absolute_paths: "--html-absolute-paths",
41
+ branches: "-b",
42
+ sort_uncovered: "-u",
43
+ sort_percentage: "-p",
44
+ gcov_executable: "--gcov-executable",
45
+ exclude_unreachable_branches: "--exclude-unreachable-branches",
46
+ use_gcov_files: "-g",
47
+ print_summary: "-s"
48
+ }
49
+
50
+ def self.run(params)
51
+ unless Helper.test?
52
+ raise "gcovr not installed".red if `which gcovr`.length == 0
53
+ end
54
+
55
+ # The args we will build with
56
+ gcovr_args = nil
57
+
58
+ # Allows for a whole variety of configurations
59
+ if params.first.is_a? Hash
60
+ params_hash = params.first
61
+
62
+ # Check if an output path was given
63
+ if params_hash.has_key? :output
64
+ create_output_dir_if_not_exists(params_hash[:output])
65
+ end
66
+
67
+ # Maps parameter hash to CLI args
68
+ gcovr_args = params_hash_to_cli_args(params_hash)
69
+ else
70
+ gcovr_args = params
71
+ end
72
+
73
+ # Joins args into space delimited string
74
+ gcovr_args = gcovr_args.join(" ")
75
+
76
+ command = "gcovr #{gcovr_args}"
77
+ Helper.log.info "Generating code coverage.".green
78
+ Helper.log.debug command
79
+ Actions.sh command
80
+ end
81
+
82
+ def self.create_output_dir_if_not_exists(output_path)
83
+ output_dir = File.dirname(output_path)
84
+
85
+ # If the output directory doesn't exist, create it
86
+ unless Dir.exists? output_dir
87
+ FileUtils.mkpath output_dir
88
+ end
89
+ end
90
+
91
+ def self.params_hash_to_cli_args(params)
92
+ # Remove nil value params
93
+ params = params.delete_if { |_, v| v.nil? }
94
+
95
+ # Maps nice developer param names to CLI arguments
96
+ params.map do |k, v|
97
+ v ||= ""
98
+ if args = ARGS_MAP[k]
99
+ value = (v != true && v.to_s.length > 0 ? "\"#{v}\"" : "")
100
+ "#{args} #{value}".strip
101
+ end
102
+ end.compact
103
+ end
104
+ end
105
+ end
106
+ end
@@ -0,0 +1,47 @@
1
+ module Fastlane
2
+ module Actions
3
+ class TypetalkAction
4
+ def self.run(params)
5
+ options = {
6
+ message: nil,
7
+ success: true,
8
+ topicId: nil,
9
+ typetalk_token: nil,
10
+ }.merge(params.first || {})
11
+
12
+ [:message, :topicId, :typetalk_token].each { |key|
13
+ raise "No #{key} given.".red unless options[key]
14
+ }
15
+
16
+ emoticon = (options[:success] ? ':smile:' : ':rage:')
17
+ message = "#{emoticon} #{options[:message].to_s}"
18
+ topicId = options[:topicId]
19
+ typetalk_token = options[:typetalk_token]
20
+
21
+ self.post_to_typetalk(message, topicId, typetalk_token)
22
+
23
+ Helper.log.info 'Successfully sent Typetalk notification'.green
24
+ end
25
+
26
+ def self.post_to_typetalk(message, topicId, typetalk_token)
27
+ require 'net/http'
28
+ require 'uri'
29
+
30
+ uri = URI.parse("https://typetalk.in/api/v1/topics/#{topicId}")
31
+ response = Net::HTTP.post_form(uri, {'message' => message,
32
+ 'typetalk_token' => typetalk_token})
33
+
34
+ self.check_response(response)
35
+ end
36
+
37
+ def self.check_response(response)
38
+ case response.code.to_i
39
+ when 200, 204
40
+ true
41
+ else
42
+ raise "Could not sent Typetalk notification".red
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '0.1.13'
2
+ VERSION = '0.1.14'
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: 0.1.13
4
+ version: 0.1.14
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-24 00:00:00.000000000 Z
11
+ date: 2015-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: fastlane_core
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 0.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 0.2.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: deliver
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -298,6 +298,7 @@ files:
298
298
  - lib/fastlane/actions/deliver.rb
299
299
  - lib/fastlane/actions/deploygate.rb
300
300
  - lib/fastlane/actions/frameit.rb
301
+ - lib/fastlane/actions/gcovr.rb
301
302
  - lib/fastlane/actions/hipchat.rb
302
303
  - lib/fastlane/actions/hockey.rb
303
304
  - lib/fastlane/actions/increment_build_number.rb
@@ -311,6 +312,7 @@ files:
311
312
  - lib/fastlane/actions/team_id.rb
312
313
  - lib/fastlane/actions/team_name.rb
313
314
  - lib/fastlane/actions/testmunk.rb
315
+ - lib/fastlane/actions/typetalk.rb
314
316
  - lib/fastlane/actions/update_project_code_signing.rb
315
317
  - lib/fastlane/actions/xctool.rb
316
318
  - lib/fastlane/core_ext/string.rb