fastlane 1.28.0 → 1.29.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 801fcf882415279031545480f46097c3af458ae2
4
- data.tar.gz: 8c7f3068f19f4e20035ff95a976bef494b8ebb68
3
+ metadata.gz: 86852ebd0536d996f2f8e7b10a5a830732c4108f
4
+ data.tar.gz: 4a6252d054e162df406b5a2fc8c82d3bd7c22a7f
5
5
  SHA512:
6
- metadata.gz: bd5cc1c1c89af9a374654f55a70bd9bf948fa79b0a3c6ab224fe0770a2908cf00b54fca83f8ccf3c2342e2132d3fba5c8b5ced7b9f75135b61e0336c35f7c078
7
- data.tar.gz: 797bf7f700e41fd277431217c5622e661d138db797272f92b3cb2b2a801b6ecbcdf20826ef743d96701b58a59cdc8d36c2f559a4b94b9950f49d5d10d46982bf
6
+ metadata.gz: f571176efabddf8c5c1a8873327aa832a7585c62bf8c9fc145e4c939056d10352ee1d83204ec844f6ff72d53fa352f9188d5928c07b0599eb45f357fafa9becc
7
+ data.tar.gz: 02d7f01d8e561aed2c3263184096318667bf7b6c62e6e567a70b5849a2cd6727422ab0a11e8fb5a79a50440072faecdf311ab959ee20314144e8d5216033f1ce
@@ -0,0 +1,146 @@
1
+ module Fastlane
2
+ module Actions
3
+ class NexusUploadAction < Action
4
+ def self.run(params)
5
+ command = []
6
+ command << "curl"
7
+ command << verbose(params)
8
+ command += ssl_options(params)
9
+ command += proxy_options(params)
10
+ command += upload_options(params)
11
+ command << upload_url(params)
12
+
13
+ Fastlane::Actions.sh(command.join(' '), log: false)
14
+ end
15
+
16
+ def self.upload_url(params)
17
+ "#{params[:endpoint].shellescape}/nexus/service/local/artifact/maven/content"
18
+ end
19
+
20
+ def self.verbose(params)
21
+ params[:verbose] ? "--verbose" : "--silent"
22
+ end
23
+
24
+ def self.upload_options(params)
25
+ file_path = File.expand_path(params[:file]).shellescape
26
+ file_extension = file_path.split('.').last.shellescape
27
+
28
+ options = []
29
+ options << "-F p=zip"
30
+ options << "-F hasPom=false"
31
+ options << "-F r=#{params[:repo_id].shellescape}"
32
+ options << "-F g=#{params[:repo_group_id].shellescape}"
33
+ options << "-F a=#{params[:repo_project_name].shellescape}"
34
+ options << "-F v=#{params[:repo_project_version].shellescape}"
35
+ options << "-F e=#{file_extension}"
36
+ options << "-F file=@#{file_path}"
37
+ options << "-u #{params[:username].shellescape}:#{params[:password].shellescape}"
38
+
39
+ options
40
+ end
41
+
42
+ def self.ssl_options(params)
43
+ options = []
44
+ unless params[:ssl_verify]
45
+ options << "--insecure"
46
+ end
47
+
48
+ options
49
+ end
50
+
51
+ def self.proxy_options(params)
52
+ options = []
53
+ if params[:proxy_address] && params[:proxy_port] && params[:proxy_username] && params[:proxy_password]
54
+ options << "-x #{params[:proxy_address].shellescape}:#{params[:proxy_port].shellescape}"
55
+ options << "--proxy-user #{params[:proxy_username].shellescape}:#{params[:proxy_password].shellescape}"
56
+ end
57
+
58
+ options
59
+ end
60
+
61
+ #####################################################
62
+ # @!group Documentation
63
+ #####################################################
64
+
65
+ def self.description
66
+ "Upload a file to Sonatype Nexus platform"
67
+ end
68
+
69
+ def self.available_options
70
+ [
71
+ FastlaneCore::ConfigItem.new(key: :file,
72
+ env_name: "FL_NEXUS_FILE",
73
+ description: "File to be uploaded to Nexus",
74
+ optional: false,
75
+ verify_block: proc do |value|
76
+ file_path = File.expand_path(value)
77
+ raise "Couldn't find file at path '#{file_path}'".red unless File.exist?(file_path)
78
+ end),
79
+ FastlaneCore::ConfigItem.new(key: :repo_id,
80
+ env_name: "FL_NEXUS_REPO_ID",
81
+ description: "Nexus repository id e.g. artefacts",
82
+ optional: false),
83
+ FastlaneCore::ConfigItem.new(key: :repo_group_id,
84
+ env_name: "FL_NEXUS_REPO_GROUP_ID",
85
+ description: "Nexus repository group id e.g. com.company",
86
+ optional: false),
87
+ FastlaneCore::ConfigItem.new(key: :repo_project_name,
88
+ env_name: "FL_NEXUS_REPO_PROJECT_NAME",
89
+ description: "Nexus repository commandect name. Only letters, digits, underscores(_), hyphens(-), and dots(.) are allowed",
90
+ optional: false),
91
+ FastlaneCore::ConfigItem.new(key: :repo_project_version,
92
+ env_name: "FL_NEXUS_REPO_PROJECT_VERSION",
93
+ description: "Nexus repository commandect version",
94
+ optional: false),
95
+ FastlaneCore::ConfigItem.new(key: :endpoint,
96
+ env_name: "FL_NEXUS_ENDPOINT",
97
+ description: "Nexus endpoint e.g. http://nexus:8081",
98
+ optional: false),
99
+ FastlaneCore::ConfigItem.new(key: :username,
100
+ env_name: "FL_NEXUS_USERNAME",
101
+ description: "Nexus username",
102
+ optional: false),
103
+ FastlaneCore::ConfigItem.new(key: :password,
104
+ env_name: "FL_NEXUS_PASSWORD",
105
+ description: "Nexus password",
106
+ optional: false),
107
+ FastlaneCore::ConfigItem.new(key: :ssl_verify,
108
+ env_name: "FL_NEXUS_SSL_VERIFY",
109
+ description: "Verify SSL",
110
+ default_value: true,
111
+ optional: true),
112
+ FastlaneCore::ConfigItem.new(key: :verbose,
113
+ env_name: "FL_NEXUS_VERBOSE",
114
+ description: "Make detailed output",
115
+ is_string: false,
116
+ default_value: false,
117
+ optional: true),
118
+ FastlaneCore::ConfigItem.new(key: :proxy_username,
119
+ env_name: "FL_NEXUS_PROXY_USERNAME",
120
+ description: "Proxy username",
121
+ optional: true),
122
+ FastlaneCore::ConfigItem.new(key: :proxy_password,
123
+ env_name: "FL_NEXUS_PROXY_PASSWORD",
124
+ description: "Proxy password",
125
+ optional: true),
126
+ FastlaneCore::ConfigItem.new(key: :proxy_address,
127
+ env_name: "FL_NEXUS_PROXY_ADDRESS",
128
+ description: "Proxy address",
129
+ optional: true),
130
+ FastlaneCore::ConfigItem.new(key: :proxy_port,
131
+ env_name: "FL_NEXUS_PROXY_PORT",
132
+ description: "Proxy port",
133
+ optional: true)
134
+ ]
135
+ end
136
+
137
+ def self.authors
138
+ ["xfreebird"]
139
+ end
140
+
141
+ def self.is_supported?(platform)
142
+ true
143
+ end
144
+ end
145
+ end
146
+ end
@@ -192,6 +192,7 @@ module Fastlane
192
192
  end
193
193
 
194
194
  def self.upload_plist_and_html_to_s3(s3_access_key, s3_secret_access_key, s3_bucket, plist_file_name, plist_render, html_file_name, html_render, version_file_name, version_render)
195
+ Actions.verify_gem!('aws-sdk')
195
196
  require 'aws-sdk'
196
197
  s3_client = AWS::S3.new(
197
198
  access_key_id: s3_access_key,
@@ -0,0 +1,124 @@
1
+ module Fastlane
2
+ module Actions
3
+ class SplunkmintAction < Action
4
+ def self.run(params)
5
+ command = []
6
+ command << "curl"
7
+ command << verbose(params)
8
+ command += proxy_options(params)
9
+ command += upload_options(params)
10
+ command << upload_url
11
+
12
+ result = Fastlane::Actions.sh(command.join(' '), log: false)
13
+ fail_on_error(result)
14
+
15
+ result
16
+ end
17
+
18
+ def self.fail_on_error(result)
19
+ if result.include?("error") || result.include?("Excess found")
20
+ raise "Server error, failed to upload the dSYM file".red
21
+ end
22
+ end
23
+
24
+ def self.upload_url
25
+ "https://ios.splkmobile.com/api/v1/dsyms/upload"
26
+ end
27
+
28
+ def self.verbose(params)
29
+ params[:verbose] ? "--verbose" : "--silent"
30
+ end
31
+
32
+ def self.dsym_path(params)
33
+ file_path = params[:dsym]
34
+ file_path ||= Actions.lane_context[SharedValues::DSYM_OUTPUT_PATH] || ENV[SharedValues::DSYM_OUTPUT_PATH.to_s]
35
+ file_path ||= Actions.lane_context[SharedValues::DSYM_ZIP_PATH] || ENV[SharedValues::DSYM_ZIP_PATH.to_s]
36
+
37
+ if file_path
38
+ expanded_file_path = File.expand_path(file_path)
39
+ raise "Couldn't find file at path '#{expanded_file_path}'".red unless File.exist?(expanded_file_path)
40
+
41
+ return expanded_file_path
42
+ else
43
+ raise "Couldn't find any dSYM file".red
44
+ end
45
+ end
46
+
47
+ def self.upload_options(params)
48
+ file_path = dsym_path(params).shellescape
49
+
50
+ options = []
51
+ options << "-F file=@#{file_path}"
52
+ options << "--header 'X-Splunk-Mint-Auth-Token: #{params[:api_token].shellescape}'"
53
+ options << "--header 'X-Splunk-Mint-apikey: #{params[:api_key].shellescape}'"
54
+
55
+ options
56
+ end
57
+
58
+ def self.proxy_options(params)
59
+ options = []
60
+ if params[:proxy_address] && params[:proxy_port] && params[:proxy_username] && params[:proxy_password]
61
+ options << "-x #{params[:proxy_address].shellescape}:#{params[:proxy_port].shellescape}"
62
+ options << "--proxy-user #{params[:proxy_username].shellescape}:#{params[:proxy_password].shellescape}"
63
+ end
64
+
65
+ options
66
+ end
67
+
68
+ #####################################################
69
+ # @!group Documentation
70
+ #####################################################
71
+
72
+ def self.description
73
+ "Upload dSYM file to Splunk MINT"
74
+ end
75
+
76
+ def self.available_options
77
+ [
78
+ FastlaneCore::ConfigItem.new(key: :dsym,
79
+ env_name: "FL_SPLUNKMINT_FILE",
80
+ description: "dSYM.zip file to upload to Splunk MINT",
81
+ optional: true),
82
+ FastlaneCore::ConfigItem.new(key: :api_key,
83
+ env_name: "FL_SPLUNKMINT_API_KEY",
84
+ description: "Splunk MINT App API key e.g. f57a57ca",
85
+ optional: false),
86
+ FastlaneCore::ConfigItem.new(key: :api_token,
87
+ env_name: "FL_SPLUNKMINT_API_TOKEN",
88
+ description: "Splunk MINT API token e.g. e05ba40754c4869fb7e0b61",
89
+ optional: false),
90
+ FastlaneCore::ConfigItem.new(key: :verbose,
91
+ env_name: "FL_SPLUNKMINT_VERBOSE",
92
+ description: "Make detailed output",
93
+ is_string: false,
94
+ default_value: false,
95
+ optional: true),
96
+ FastlaneCore::ConfigItem.new(key: :proxy_username,
97
+ env_name: "FL_SPLUNKMINT_PROXY_USERNAME",
98
+ description: "Proxy username",
99
+ optional: true),
100
+ FastlaneCore::ConfigItem.new(key: :proxy_password,
101
+ env_name: "FL_SPLUNKMINT_PROXY_PASSWORD",
102
+ description: "Proxy password",
103
+ optional: true),
104
+ FastlaneCore::ConfigItem.new(key: :proxy_address,
105
+ env_name: "FL_SPLUNKMINT_PROXY_ADDRESS",
106
+ description: "Proxy address",
107
+ optional: true),
108
+ FastlaneCore::ConfigItem.new(key: :proxy_port,
109
+ env_name: "FL_SPLUNKMINT_PROXY_PORT",
110
+ description: "Proxy port",
111
+ optional: true)
112
+ ]
113
+ end
114
+
115
+ def self.authors
116
+ ["xfreebird"]
117
+ end
118
+
119
+ def self.is_supported?(platform)
120
+ platform == :ios
121
+ end
122
+ end
123
+ end
124
+ end
@@ -25,19 +25,22 @@ module Fastlane
25
25
  Helper.log.info "Successfully verified the code signature".green
26
26
 
27
27
  # Check 2/2
28
-
29
- Helper.log.info "Verifying the signature of Xcode...".green
28
+ # More information https://developer.apple.com/news/?id=09222015a
29
+ Helper.log.info "Verifying Xcode using GateKeeper..."
30
30
  Helper.log.info "This will take up to a few minutes, now is a great time to go for a coffee ☕...".green
31
- command = "codesign --verify --deep --verbose '#{params[:xcode_path]}'"
32
31
 
33
- must_includes = [
34
- "valid on disk",
35
- "satisfies its Designated Requirement"
36
- ]
32
+ command = "spctl --assess --verbose '#{params[:xcode_path]}'"
33
+ must_includes = ['accepted']
37
34
 
38
- verify(command: command, must_includes: must_includes, params: params)
35
+ output = verify(command: command, must_includes: must_includes, params: params)
39
36
 
40
- Helper.log.info "Successfully verified Xcode installation at path '#{params[:xcode_path]}' 🎧".green
37
+ if output.include?("source=Mac App Store") or output.include?("source=Apple") or output.include?("source=Apple System")
38
+ Helper.log.info "Successfully verified Xcode installation at path '#{params[:xcode_path]}' 🎧".green
39
+ else
40
+ show_and_raise_error("Invalid Download Source of Xcode")
41
+ end
42
+
43
+ true
41
44
  end
42
45
 
43
46
  def self.verify(command: nil, must_includes: nil, params: nil)
@@ -50,12 +53,18 @@ module Fastlane
50
53
  end
51
54
 
52
55
  if errors.count > 0
53
- Helper.log.fatal "Attention: Your Xcode Installation might be hacked.".red
54
- Helper.log.fatal "This might be a false alarm, if so, please submit an issue on GitHub".red
55
- Helper.log.fatal "The following information couldn't be found:".red
56
- Helper.log.fatal errors.join("\n").yellow
57
- raise "The Xcode installation at path '#{params[:xcode_path]}' might be compromised."
56
+ show_and_raise_error(errors.join("\n"))
58
57
  end
58
+
59
+ return output
60
+ end
61
+
62
+ def show_and_raise_error(error)
63
+ Helper.log.fatal "Attention: Your Xcode Installation might be hacked.".red
64
+ Helper.log.fatal "This might be a false alarm, if so, please submit an issue on GitHub".red
65
+ Helper.log.fatal "The following information couldn't be found:".red
66
+ Helper.log.fatal error.yellow
67
+ raise "The Xcode installation at path '#{params[:xcode_path]}' might be compromised."
59
68
  end
60
69
 
61
70
  #####################################################
@@ -206,19 +206,14 @@ module Fastlane
206
206
  # Checkout the repo
207
207
  repo_name = url.split("/").last
208
208
 
209
- clone_folder = File.join("/tmp", "fl_clones", repo_name)
209
+ tmp_path = File.join("/tmp", "fl_clones_#{Time.now.to_i}")
210
+ clone_folder = File.join(tmp_path, repo_name)
210
211
 
211
212
  branch_option = ""
212
213
  branch_option = "--branch #{branch}" if branch != 'HEAD'
213
214
 
214
215
  clone_command = "git clone '#{url}' '#{clone_folder}' --depth 1 -n #{branch_option}"
215
216
 
216
- if Dir.exist? clone_folder
217
- # We want to re-clone if the folder already exists
218
- Helper.log.info "Deleting existing git repo..."
219
- Actions.sh("rm -rf '#{clone_folder}'")
220
- end
221
-
222
217
  Helper.log.info "Cloning remote git repo..."
223
218
  Actions.sh(clone_command)
224
219
 
@@ -235,6 +230,12 @@ module Fastlane
235
230
  end
236
231
 
237
232
  import(File.join(clone_folder, path))
233
+
234
+ if Dir.exist?(clone_folder)
235
+ # We want to re-clone if the folder already exists
236
+ Helper.log.info "Clearing the git repo..."
237
+ Actions.sh("rm -rf '#{tmp_path}'")
238
+ end
238
239
  end
239
240
  end
240
241
 
@@ -6,9 +6,22 @@ module Fastlane
6
6
  begin
7
7
  Gem::Specification.find_by_name(gem_name)
8
8
  rescue Gem::LoadError
9
- raise "You have to install the `#{gem_name}` using `sudo gem install #{gem_name}` to use this action".red
9
+ print_gem_error "Could not find gem '#{gem_name}'"
10
+ print_gem_error ""
11
+ print_gem_error "If you installed fastlane using `sudo gem install fastlane` run"
12
+ print_gem_error "`sudo gem install #{gem_name}` to install the missing gem"
13
+ print_gem_error ""
14
+ print_gem_error "If you use a Gemfile add this to your Gemfile:"
15
+ print_gem_error "gem '#{gem_name}'"
16
+ print_gem_error "and run `bundle install`"
17
+
18
+ raise "You have to install the `#{gem_name}`".red unless Helper.is_test?
10
19
  end
11
20
  true
12
21
  end
22
+
23
+ def self.print_gem_error(str)
24
+ Helper.log.error str.red
25
+ end
13
26
  end
14
27
  end
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.28.0'
2
+ VERSION = '1.29.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.28.0
4
+ version: 1.29.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: 2015-09-21 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.0'
55
- - !ruby/object:Gem::Dependency
56
- name: aws-sdk
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '1.0'
62
- type: :runtime
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '1.0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: xcodeproj
71
57
  requirement: !ruby/object:Gem::Requirement
@@ -210,7 +196,7 @@ dependencies:
210
196
  requirements:
211
197
  - - ">="
212
198
  - !ruby/object:Gem::Version
213
- version: 0.8.1
199
+ version: 0.8.2
214
200
  - - "<"
215
201
  - !ruby/object:Gem::Version
216
202
  version: 1.0.0
@@ -220,7 +206,7 @@ dependencies:
220
206
  requirements:
221
207
  - - ">="
222
208
  - !ruby/object:Gem::Version
223
- version: 0.8.1
209
+ version: 0.8.2
224
210
  - - "<"
225
211
  - !ruby/object:Gem::Version
226
212
  version: 1.0.0
@@ -390,7 +376,7 @@ dependencies:
390
376
  requirements:
391
377
  - - ">="
392
378
  - !ruby/object:Gem::Version
393
- version: 0.7.2
379
+ version: 0.7.3
394
380
  - - "<"
395
381
  - !ruby/object:Gem::Version
396
382
  version: 1.0.0
@@ -400,7 +386,7 @@ dependencies:
400
386
  requirements:
401
387
  - - ">="
402
388
  - !ruby/object:Gem::Version
403
- version: 0.7.2
389
+ version: 0.7.3
404
390
  - - "<"
405
391
  - !ruby/object:Gem::Version
406
392
  version: 1.0.0
@@ -536,48 +522,6 @@ dependencies:
536
522
  - - "~>"
537
523
  - !ruby/object:Gem::Version
538
524
  version: '0.29'
539
- - !ruby/object:Gem::Dependency
540
- name: artifactory
541
- requirement: !ruby/object:Gem::Requirement
542
- requirements:
543
- - - "~>"
544
- - !ruby/object:Gem::Version
545
- version: '2.0'
546
- type: :development
547
- prerelease: false
548
- version_requirements: !ruby/object:Gem::Requirement
549
- requirements:
550
- - - "~>"
551
- - !ruby/object:Gem::Version
552
- version: '2.0'
553
- - !ruby/object:Gem::Dependency
554
- name: slather
555
- requirement: !ruby/object:Gem::Requirement
556
- requirements:
557
- - - "~>"
558
- - !ruby/object:Gem::Version
559
- version: '1.8'
560
- type: :development
561
- prerelease: false
562
- version_requirements: !ruby/object:Gem::Requirement
563
- requirements:
564
- - - "~>"
565
- - !ruby/object:Gem::Version
566
- version: '1.8'
567
- - !ruby/object:Gem::Dependency
568
- name: cocoapods
569
- requirement: !ruby/object:Gem::Requirement
570
- requirements:
571
- - - "~>"
572
- - !ruby/object:Gem::Version
573
- version: 0.38.2
574
- type: :development
575
- prerelease: false
576
- version_requirements: !ruby/object:Gem::Requirement
577
- requirements:
578
- - - "~>"
579
- - !ruby/object:Gem::Version
580
- version: 0.38.2
581
525
  description: Connect all iOS deployment tools into one streamlined workflow
582
526
  email:
583
527
  - fastlane@krausefx.com
@@ -654,6 +598,7 @@ files:
654
598
  - lib/fastlane/actions/last_git_tag.rb
655
599
  - lib/fastlane/actions/lcov.rb
656
600
  - lib/fastlane/actions/mailgun.rb
601
+ - lib/fastlane/actions/nexus_upload.rb
657
602
  - lib/fastlane/actions/notify.rb
658
603
  - lib/fastlane/actions/oclint.rb
659
604
  - lib/fastlane/actions/opt_out_usage.rb
@@ -679,6 +624,7 @@ files:
679
624
  - lib/fastlane/actions/slack.rb
680
625
  - lib/fastlane/actions/slather.rb
681
626
  - lib/fastlane/actions/snapshot.rb
627
+ - lib/fastlane/actions/splunkmint.rb
682
628
  - lib/fastlane/actions/team_id.rb
683
629
  - lib/fastlane/actions/team_name.rb
684
630
  - lib/fastlane/actions/testflight.rb