fastlane 2.118.0.beta.20190315200105 → 2.118.0.beta.20190316200016

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: 8068e89b3f12ff2ac5b7bcfde2a67348fd6ffdca
4
- data.tar.gz: 436903e09ea72d51e5f2cbd1b1a02ca346f4dce7
3
+ metadata.gz: 3b4715be2a129779b852399bf962e0abf4101816
4
+ data.tar.gz: 781cbad90a72dab151035a696640fa7d648d46e8
5
5
  SHA512:
6
- metadata.gz: 57806cde3a09796c20a42767d08f95cbc543c134f2a51c04ddb9c9e04cf5ed45ee938f83055a3d0e0c48578fc296dbe7dba6f92254fff03e28e59aaffa334d1f
7
- data.tar.gz: bae632239408a02afbdd7ebd3b06c22b42370ae44eaabfaaf0b685a4b2906136e92f7df0d4d0f3b09096a55844a1b3b7c3d003195f261281ea097688db05c53c
6
+ metadata.gz: afe659f4a8e4447676c8dcdf97192478a34d836ee3c9bac70d3dc473d5f3f57911ccde60f06f56b592d7464a3a2ff69f14c6cc417b926149876c9bb52345766b
7
+ data.tar.gz: 0f9fafc62f0284570435778649009b0199bcfa94f5d4920fc1f8f1baa8d9eab67ecd7866c75c28e9a5eaef629a4b6e96ff8bd61a5ebab5ec50505774b0d9c4eb
@@ -2,9 +2,15 @@ module Fastlane
2
2
  module Actions
3
3
  class ClipboardAction < Action
4
4
  def self.run(params)
5
- UI.message("Storing '#{params[:value]}' in the clipboard 🎨")
5
+ value = params[:value]
6
6
 
7
- `echo "#{params[:value]}" | tr -d '\n' | pbcopy` # we don't use `sh`, as the command looks ugly
7
+ truncated_value = value[0..800].gsub(/\s\w+\s*$/, '...')
8
+ UI.message("Storing '#{truncated_value}' in the clipboard 🎨")
9
+
10
+ if FastlaneCore::Helper.mac?
11
+ require 'open3'
12
+ Open3.popen3('pbcopy') { |input, _, _| input << value }
13
+ end
8
14
  end
9
15
 
10
16
  #####################################################
@@ -24,7 +30,7 @@ module Fastlane
24
30
  end
25
31
 
26
32
  def self.authors
27
- ["KrauseFx"]
33
+ ["KrauseFx", "joshdholtz"]
28
34
  end
29
35
 
30
36
  def self.is_supported?(platform)
@@ -0,0 +1,135 @@
1
+ module Fastlane
2
+ module Actions
3
+ class SpaceshipLogsAction < Action
4
+ def self.run(params)
5
+ latest = params[:latest]
6
+ print_contents = params[:print_contents]
7
+ print_paths = params[:print_paths]
8
+ copy_to_path = params[:copy_to_path]
9
+ copy_to_clipboard = params[:copy_to_clipboard]
10
+
11
+ # Get log files
12
+ files = Dir.glob("/tmp/spaceship*.log").sort_by { |f| File.mtime(f) }.reverse
13
+
14
+ if files.size == 0
15
+ UI.message("No Spaceship log files found")
16
+ return []
17
+ end
18
+
19
+ # Filter to latest
20
+ if latest
21
+ files = [files.first]
22
+ end
23
+
24
+ # Print contents
25
+ if print_contents
26
+ files.each do |file|
27
+ data = File.read(file)
28
+ puts("-----------------------------------------------------------------------------------")
29
+ puts(" Spaceship Log Content - #{file}")
30
+ puts("-----------------------------------------------------------------------------------")
31
+ puts(data)
32
+ puts("\n")
33
+ end
34
+ end
35
+
36
+ # Print paths
37
+ if print_paths
38
+ puts("-----------------------------------------------------------------------------------")
39
+ puts(" Spaceship Log Paths")
40
+ puts("-----------------------------------------------------------------------------------")
41
+ files.each do |file|
42
+ puts(file)
43
+ end
44
+ puts("\n")
45
+ end
46
+
47
+ # Copy to a directory
48
+ if copy_to_path
49
+ require 'fileutils'
50
+ FileUtils.mkdir_p(copy_to_path)
51
+ files.each do |file|
52
+ FileUtils.cp(file, copy_to_path)
53
+ end
54
+ end
55
+
56
+ # Copy contents to clipboard
57
+ if copy_to_clipboard
58
+ string = files.map { |file| File.read(file) }.join("\n")
59
+ ClipboardAction.run(value: string)
60
+ end
61
+
62
+ return files
63
+ end
64
+
65
+ def self.description
66
+ "Find, print, and copy Spaceship logs"
67
+ end
68
+
69
+ def self.available_options
70
+ [
71
+ FastlaneCore::ConfigItem.new(key: :latest,
72
+ description: "Finds only the latest Spaceshop log file if set to true, otherwise returns all",
73
+ default_value: true,
74
+ type: Boolean),
75
+ FastlaneCore::ConfigItem.new(key: :print_contents,
76
+ description: "Prints the contents of the found Spaceship log file(s)",
77
+ default_value: false,
78
+ type: Boolean),
79
+ FastlaneCore::ConfigItem.new(key: :print_paths,
80
+ description: "Prints the paths of the found Spaceship log file(s)",
81
+ default_value: false,
82
+ type: Boolean),
83
+ FastlaneCore::ConfigItem.new(key: :copy_to_path,
84
+ description: "Copies the found Spaceship log file(s) to a directory",
85
+ optional: true),
86
+ FastlaneCore::ConfigItem.new(key: :copy_to_clipboard,
87
+ description: "Copies the contents of the found Spaceship log file(s) to the clipboard",
88
+ default_value: false,
89
+ type: Boolean)
90
+ ]
91
+ end
92
+
93
+ def self.is_supported?(platform)
94
+ true
95
+ end
96
+
97
+ def self.example_code
98
+ [
99
+ 'spaceship_logs',
100
+ 'spaceship_logs(
101
+ copy_to_path: "/tmp/artifacts"
102
+ )',
103
+ 'spaceship_logs(
104
+ copy_to_clipboard: true
105
+ )',
106
+ 'spaceship_logs(
107
+ print_contents: true,
108
+ print_paths: true
109
+ )',
110
+ 'spaceship_logs(
111
+ latest: false,
112
+ print_contents: true,
113
+ print_paths: true
114
+ )'
115
+ ]
116
+ end
117
+
118
+ def self.category
119
+ :misc
120
+ end
121
+
122
+ def self.return_value
123
+ "The array of Spaceship logs"
124
+ end
125
+
126
+ def self.return_type
127
+ :array
128
+ end
129
+
130
+ def self.author
131
+ "joshdholtz"
132
+ end
133
+ end
134
+ end
135
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
- VERSION = '2.118.0.beta.20190315200105'.freeze
2
+ VERSION = '2.118.0.beta.20190316200016'.freeze
3
3
  DESCRIPTION = "The easiest way to automate beta deployments and releases for your iOS and Android apps".freeze
4
4
  MINIMUM_XCODE_RELEASE = "7.0".freeze
5
5
  RUBOCOP_REQUIREMENT = '0.49.1'.freeze
@@ -45,6 +45,7 @@ module FastlaneCore
45
45
  if line =~ /^-- /
46
46
  (os_type, os_version) = line.gsub(/-- (.*) --/, '\1').split
47
47
  else
48
+ next if os_type =~ /^Unavailable/
48
49
 
49
50
  # " iPad (5th generation) (852A5796-63C3-4641-9825-65EBDC5C4259) (Shutdown)"
50
51
  # This line will turn the above string into
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.118.0.beta.20190315200105
4
+ version: 2.118.0.beta.20190316200016
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jimmy Dee
@@ -27,7 +27,7 @@ authors:
27
27
  autorequire:
28
28
  bindir: bin
29
29
  cert_chain: []
30
- date: 2019-03-15 00:00:00.000000000 Z
30
+ date: 2019-03-16 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: slack-notifier
@@ -1152,6 +1152,7 @@ files:
1152
1152
  - fastlane/lib/fastlane/actions/slather.rb
1153
1153
  - fastlane/lib/fastlane/actions/snapshot.rb
1154
1154
  - fastlane/lib/fastlane/actions/sonar.rb
1155
+ - fastlane/lib/fastlane/actions/spaceship_logs.rb
1155
1156
  - fastlane/lib/fastlane/actions/splunkmint.rb
1156
1157
  - fastlane/lib/fastlane/actions/spm.rb
1157
1158
  - fastlane/lib/fastlane/actions/ssh.rb
@@ -1687,24 +1688,24 @@ metadata:
1687
1688
  post_install_message:
1688
1689
  rdoc_options: []
1689
1690
  require_paths:
1690
- - precheck/lib
1691
- - pem/lib
1692
- - deliver/lib
1693
- - cert/lib
1694
- - spaceship/lib
1691
+ - screengrab/lib
1692
+ - match/lib
1693
+ - pilot/lib
1694
+ - produce/lib
1695
+ - credentials_manager/lib
1695
1696
  - scan/lib
1696
1697
  - frameit/lib
1697
- - snapshot/lib
1698
- - produce/lib
1699
1698
  - sigh/lib
1700
- - supply/lib
1699
+ - fastlane_core/lib
1701
1700
  - gym/lib
1702
- - credentials_manager/lib
1703
- - pilot/lib
1704
- - screengrab/lib
1705
- - match/lib
1701
+ - pem/lib
1702
+ - precheck/lib
1703
+ - supply/lib
1704
+ - deliver/lib
1705
+ - spaceship/lib
1706
+ - cert/lib
1706
1707
  - fastlane/lib
1707
- - fastlane_core/lib
1708
+ - snapshot/lib
1708
1709
  required_ruby_version: !ruby/object:Gem::Requirement
1709
1710
  requirements:
1710
1711
  - - ">="