fastlane-craft 1.3.12 → 1.4.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
  SHA256:
3
- metadata.gz: a13d62bf4fee480fe78f82f5a0d88f0b685484664c0cf85dbc082f24195e0ac7
4
- data.tar.gz: 551771c35fe06844732d67093a230be58a8fb4c34cc5d63e35a7cb32810ffb4a
3
+ metadata.gz: 6b8499c0d0064edadabc667cce7b5ed6be67e96d9d08567b0be91daf95917ac3
4
+ data.tar.gz: fdc52b0ac3cc687875fca4d19498cf075a920114b6ac5096732a05aa51914ee5
5
5
  SHA512:
6
- metadata.gz: 88deeb14e73b8059d8cb70625b07bf9e9d291a1561990a2ea7e75b518c0d5336dee1de83368056d7b11c1e8da910ca1ed3bbb2565010d5ab29bb328172c90769
7
- data.tar.gz: 6d214419072c624de3cf33977d8eed6aed38646d051df447e56efc0440c633c6828423d3f95ba67714fe228577a1d45dbb7111df74ae0d2e478b6c59d667dc9b
6
+ metadata.gz: 67f72ff63a3a609d43b4614c9642e80eee843a7221afa2f091c2eb2b6860ca19dd71f64c440767a8a7d4eca83da55573e8627a7d16532dc84336b0172348ce25
7
+ data.tar.gz: a681ce300e49fb8350255e96115f99de2a868d16af584de19be3c22fa9acb0e80b3b42c148b33f2a8c5977d8cebdbf96adc86bf2a78427d466647639abf36521
@@ -90,6 +90,7 @@ module FastlaneCraft
90
90
 
91
91
  def curr_git_tag
92
92
  return @version.to_s unless @target_suffix
93
+
93
94
  "#{@version}_#{@target_suffix}"
94
95
  end
95
96
 
@@ -7,6 +7,7 @@ module FastlaneCraft
7
7
  def initialize(info_plist, extra_info_plists = [])
8
8
  raise 'Invalid Info Plist Path' unless File.file?(info_plist)
9
9
  raise 'Invalid Extra Info Plists Paths' unless extra_info_plists.all? { |p| File.file?(p) }
10
+
10
11
  @info_plist = info_plist
11
12
  @extra_info_plists = extra_info_plists
12
13
  end
@@ -9,6 +9,7 @@ module FastlaneCraft
9
9
  def initialize(bot_api_token:, chat_id:)
10
10
  raise 'Invalid Bot Api Token' if bot_api_token.empty?
11
11
  raise 'Invalid Chat Id' if chat_id.empty?
12
+
12
13
  @bot_api_token = bot_api_token
13
14
  @chat_id = chat_id
14
15
  end
@@ -7,7 +7,7 @@ module Fastlane
7
7
  kind = params[:kind]
8
8
  version = params[:version]
9
9
  dsym_path = params[:dSYM]
10
- dsym_name = File.basename(dsym_path, ".*")
10
+ dsym_name = File.basename(dsym_path, '.*')
11
11
  dsym_ext = File.extname(dsym_path)
12
12
 
13
13
  bucket = params[:space] || params[:bucket]
@@ -24,16 +24,16 @@ module Fastlane
24
24
 
25
25
  UI.message "Check whether destination bucket #{bucket} exists..💤"
26
26
  begin
27
- response = client.create_bucket({
27
+ response = client.create_bucket(
28
28
  bucket: bucket,
29
29
  acl: acl
30
- })
30
+ )
31
31
  UI.message "Bucket #{bucket} created! ✨"
32
32
  rescue Aws::S3::Errors::BucketAlreadyExists
33
33
  UI.message "Bucket #{bucket} alredy exists 👌"
34
34
  end
35
35
 
36
- UI.message "Going to upload dSYM..💤"
36
+ UI.message 'Going to upload dSYM..💤'
37
37
  File.open(dsym_path, 'r') do |body|
38
38
  response = client.put_object(
39
39
  acl: acl,
@@ -51,91 +51,91 @@ module Fastlane
51
51
  #####################################################
52
52
 
53
53
  def self.description
54
- "Upload dSYM archive to S3 or Spaces"
54
+ 'Upload dSYM archive to S3 or Spaces'
55
55
  end
56
56
 
57
57
  def self.available_options
58
58
  [
59
59
  FastlaneCore::ConfigItem.new(key: :kind,
60
- env_name: "FL_UPLOAD_DSYM_KIND",
60
+ env_name: 'FL_UPLOAD_DSYM_KIND',
61
61
  description: "Origin of the dSYM ('Beta', 'Release', etc)",
62
62
  is_string: true,
63
63
  default_value: ENV['BITRISE_TRIGGERED_WORKFLOW_TITLE'],
64
64
  verify_block: proc do |value|
65
- UI.user_error!("No kind for UploadDsymAction given, pass using `kind: 'kind'`") unless (value and not value.empty?)
65
+ UI.user_error!("No kind for UploadDsymAction given, pass using `kind: 'kind'`") unless value && !value.empty?
66
66
  end),
67
67
  FastlaneCore::ConfigItem.new(key: :version,
68
- env_name: "FL_UPLOAD_DSYM_VERSION",
68
+ env_name: 'FL_UPLOAD_DSYM_VERSION',
69
69
  description: "Version of a constructed .ipa. (Build number '321', App version '1.2.3', etc.)",
70
70
  is_string: true,
71
71
  default_value: ENV['APP_RELEASE_BUILD_NUMBER'] || ENV['BITRISE_BUILD_NUMBER'],
72
72
  verify_block: proc do |value|
73
- UI.user_error!("No version for UploadDsymAction given, pass using `version: 'version'`") unless (value and not value.empty?)
73
+ UI.user_error!("No version for UploadDsymAction given, pass using `version: 'version'`") unless value && !value.empty?
74
74
  end),
75
75
  FastlaneCore::ConfigItem.new(key: :dSYM,
76
- env_name: "FL_UPLOAD_DSYM_PATH",
77
- description: "Archived dSYM files",
76
+ env_name: 'FL_UPLOAD_DSYM_PATH',
77
+ description: 'Archived dSYM files',
78
78
  is_string: true,
79
79
  default_value: ENV['DSYM_OUTPUT_PATH'] || Dir['*.dSYM.zip'].first,
80
80
  verify_block: proc do |value|
81
- UI.user_error!("Couldn't find dSYM file at path '#{value}'") unless File.exist?(value)
81
+ UI.user_error!("Couldn't find dSYM file at path '#{value}'") unless File.exist?(value)
82
82
  end),
83
83
  FastlaneCore::ConfigItem.new(key: :region,
84
- env_name: "FL_UPLOAD_DSYM_REGION",
85
- description: "Region for S3 or Spaces",
84
+ env_name: 'FL_UPLOAD_DSYM_REGION',
85
+ description: 'Region for S3 or Spaces',
86
86
  is_string: true,
87
87
  default_value: 'ams3',
88
88
  verify_block: proc do |value|
89
- UI.user_error!("No region for UploadDsymAction given, pass using `region: 'region'`") unless (value and not value.empty?)
89
+ UI.user_error!("No region for UploadDsymAction given, pass using `region: 'region'`") unless value && !value.empty?
90
90
  end),
91
91
  FastlaneCore::ConfigItem.new(key: :endpoint,
92
- env_name: "FL_UPLOAD_DSYM_ENDPOINT",
93
- description: "Endpoint for S3 or Spaces",
92
+ env_name: 'FL_UPLOAD_DSYM_ENDPOINT',
93
+ description: 'Endpoint for S3 or Spaces',
94
94
  is_string: true,
95
95
  default_value: 'https://ams3.digitaloceanspaces.com',
96
96
  verify_block: proc do |value|
97
- UI.user_error!("No Endpoint for UploadDsymAction given, pass using `endpoint: 'endpoint'`") unless (value and not value.empty?)
97
+ UI.user_error!("No Endpoint for UploadDsymAction given, pass using `endpoint: 'endpoint'`") unless value && !value.empty?
98
98
  end),
99
99
  FastlaneCore::ConfigItem.new(key: :access_key,
100
- env_name: "FL_UPLOAD_DSYM_S3_ACCESS_KEY",
101
- description: "Access Key for S3 or Spaces",
100
+ env_name: 'FL_UPLOAD_DSYM_S3_ACCESS_KEY',
101
+ description: 'Access Key for S3 or Spaces',
102
102
  is_string: true,
103
103
  verify_block: proc do |value|
104
- raise "No Access Key for UploadDsymAction given, pass using `access_key: 'access_key'`".red unless (value and not value.empty?)
104
+ raise "No Access Key for UploadDsymAction given, pass using `access_key: 'access_key'`".red unless value && !value.empty?
105
105
  end),
106
106
  FastlaneCore::ConfigItem.new(key: :secret_access_key,
107
- env_name: "FL_UPLOAD_DSYM_S3_SECRET_ACCESS_KEY",
108
- description: "Secret Access Key for S3 or Spaces",
107
+ env_name: 'FL_UPLOAD_DSYM_S3_SECRET_ACCESS_KEY',
108
+ description: 'Secret Access Key for S3 or Spaces',
109
109
  is_string: true,
110
110
  verify_block: proc do |value|
111
- raise "No Secret Access Key for UploadDsymAction given, pass using `secret_access_key: 'secret_access_key'`".red unless (value and not value.empty?)
111
+ raise "No Secret Access Key for UploadDsymAction given, pass using `secret_access_key: 'secret_access_key'`".red unless value && !value.empty?
112
112
  end),
113
113
  FastlaneCore::ConfigItem.new(key: :bucket,
114
- env_name: "FL_UPLOAD_DSYM_S3_BUCKET",
115
- description: "Bucket for S3 or Spaces",
114
+ env_name: 'FL_UPLOAD_DSYM_S3_BUCKET',
115
+ description: 'Bucket for S3 or Spaces',
116
116
  is_string: true,
117
117
  default_value: 'default',
118
118
  verify_block: proc do |value|
119
- raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless (value and not value.empty?)
119
+ raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless value && !value.empty?
120
120
  end),
121
121
  FastlaneCore::ConfigItem.new(key: :space,
122
- env_name: "FL_UPLOAD_DSYM_SPACE",
123
- description: "Digital Ocean Space",
122
+ env_name: 'FL_UPLOAD_DSYM_SPACE',
123
+ description: 'Digital Ocean Space',
124
124
  is_string: true,
125
125
  default_value: 'appcraft-dsym'),
126
126
  FastlaneCore::ConfigItem.new(key: :acl,
127
- env_name: "FL_UPLOAD_DSYM_S3_ACL",
128
- description: "Access level for the file",
127
+ env_name: 'FL_UPLOAD_DSYM_S3_ACL',
128
+ description: 'Access level for the file',
129
129
  is_string: true,
130
- default_value: "private",
130
+ default_value: 'private',
131
131
  verify_block: proc do |value|
132
- raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless (value and not value.empty?)
133
- end),
132
+ raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless value && !value.empty?
133
+ end)
134
134
  ]
135
135
  end
136
136
 
137
137
  def self.authors
138
- ["https://github.com/sroik", "https://github.com/elfenlaid"]
138
+ ['https://github.com/sroik', 'https://github.com/elfenlaid']
139
139
  end
140
140
 
141
141
  def self.is_supported?(platform)
@@ -1,144 +1,144 @@
1
1
  module Fastlane
2
- module Actions
3
- module SharedValues
4
- UPLOADED_S3_URL = 'UPLOAD_S3_URL'.freeze
5
- end
2
+ module Actions
3
+ module SharedValues
4
+ UPLOADED_S3_URL = 'UPLOAD_S3_URL'.freeze
5
+ end
6
6
 
7
- class UploadToS3Action < Action
8
- def self.run(params)
9
- require 'aws-sdk-s3'
7
+ class UploadToS3Action < Action
8
+ def self.run(params)
9
+ require 'aws-sdk-s3'
10
10
 
11
- local_path = params[:path]
12
- local_name = File.basename(local_path, )
11
+ local_path = params[:path]
12
+ local_name = File.basename(local_path)
13
13
 
14
- bucket = params[:space] || params[:bucket]
15
- acl = params[:acl]
16
- file_key = local_name
17
- file_path = params[:space] ? params[:bucket] + '/' + file_key : file_key
14
+ bucket = params[:space] || params[:bucket]
15
+ acl = params[:acl]
16
+ file_key = local_name
17
+ file_path = params[:space] ? params[:bucket] + '/' + file_key : file_key
18
18
 
19
- client = Aws::S3::Client.new(
20
- access_key_id: params[:access_key],
21
- secret_access_key: params[:secret_access_key],
22
- endpoint: params[:endpoint],
23
- region: params[:region]
24
- )
19
+ client = Aws::S3::Client.new(
20
+ access_key_id: params[:access_key],
21
+ secret_access_key: params[:secret_access_key],
22
+ endpoint: params[:endpoint],
23
+ region: params[:region]
24
+ )
25
25
 
26
- UI.message "Check whether destination bucket #{bucket} exists..💤"
27
-
28
- begin
29
- response = client.create_bucket({
30
- bucket: bucket,
31
- acl: 'private'
32
- })
33
- UI.message "✨ Bucket #{bucket} created! ✨"
34
- rescue Aws::S3::Errors::BucketAlreadyExists
35
- UI.message "Bucket #{bucket} alredy exists 👌"
36
- end
37
-
38
- UI.message "Going to upload file to s3..💤"
39
-
40
- File.open(local_path, 'r') do |body|
41
- response = client.put_object(
42
- acl: acl,
43
- bucket: bucket,
44
- key: file_path,
45
- body: body
46
- )
47
-
48
- object = Aws::S3::Object.new(
49
- key: file_path,
50
- bucket_name: bucket,
51
- client: client
52
- )
53
-
54
- url = object.public_url
55
-
56
- UI.message "✨ file uploaded to #{url} ✨"
57
- ENV[SharedValues::UPLOADED_S3_URL] = url
58
- end
26
+ UI.message "Check whether destination bucket #{bucket} exists..💤"
27
+
28
+ begin
29
+ response = client.create_bucket(
30
+ bucket: bucket,
31
+ acl: 'private'
32
+ )
33
+ UI.message "✨ Bucket #{bucket} created! ✨"
34
+ rescue Aws::S3::Errors::BucketAlreadyExists
35
+ UI.message "Bucket #{bucket} alredy exists 👌"
59
36
  end
60
37
 
61
- #####################################################
62
- # @!group Documentation
63
- #####################################################
38
+ UI.message 'Going to upload file to s3..💤'
64
39
 
65
- def self.description
66
- "Upload file to S3 or Spaces"
67
- end
40
+ File.open(local_path, 'r') do |body|
41
+ response = client.put_object(
42
+ acl: acl,
43
+ bucket: bucket,
44
+ key: file_path,
45
+ body: body
46
+ )
68
47
 
69
- def self.available_options
70
- [
71
- FastlaneCore::ConfigItem.new(key: :path,
72
- env_name: "FL_UPLOAD_S3_PATH",
73
- description: "Upload local path",
74
- is_string: true,
75
- verify_block: proc do |value|
76
- UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
77
- end),
78
- FastlaneCore::ConfigItem.new(key: :region,
79
- env_name: "FL_UPLOAD_S3_REGION",
80
- description: "Region for S3 or Spaces",
81
- is_string: true,
82
- default_value: 'ams3',
83
- verify_block: proc do |value|
84
- UI.user_error!("No region for UploadToS3Action given, pass using `region: 'region'`") unless (value and not value.empty?)
85
- end),
86
- FastlaneCore::ConfigItem.new(key: :endpoint,
87
- env_name: "FL_UPLOAD_S3_ENDPOINT",
88
- description: "Endpoint for S3 or Spaces",
89
- is_string: true,
90
- default_value: 'https://ams3.digitaloceanspaces.com',
91
- verify_block: proc do |value|
92
- UI.user_error!("No Endpoint for UploadToS3Action given, pass using `endpoint: 'endpoint'`") unless (value and not value.empty?)
93
- end),
94
- FastlaneCore::ConfigItem.new(key: :access_key,
95
- env_name: "FL_UPLOAD_S3_ACCESS_KEY",
96
- description: "Access Key for S3 or Spaces",
97
- is_string: true,
98
- verify_block: proc do |value|
99
- raise "No Access Key for UploadToS3Action given, pass using `access_key: 'access_key'`".red unless (value and not value.empty?)
100
- end),
101
- FastlaneCore::ConfigItem.new(key: :secret_access_key,
102
- env_name: "FL_UPLOAD_S3_SECRET_ACCESS_KEY",
103
- description: "Secret Access Key for S3 or Spaces",
104
- is_string: true,
105
- verify_block: proc do |value|
106
- raise "No Secret Access Key for UploadToS3Action given, pass using `secret_access_key: 'secret_access_key'`".red unless (value and not value.empty?)
107
- end),
108
- FastlaneCore::ConfigItem.new(key: :bucket,
109
- env_name: "FL_UPLOAD_S3_BUCKET",
110
- description: "Bucket for S3 or Spaces",
111
- is_string: true,
112
- verify_block: proc do |value|
113
- raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless (value and not value.empty?)
114
- end),
115
- FastlaneCore::ConfigItem.new(key: :space,
116
- env_name: "FL_UPLOAD_S3_SPACE",
117
- description: "Digital Ocean Space",
118
- is_string: true,
119
- default_value: 'appcraft-files'),
120
- FastlaneCore::ConfigItem.new(key: :acl,
121
- env_name: "FL_UPLOAD_S3_ACL",
122
- description: "Access level for the file",
123
- is_string: true,
124
- default_value: "public-read",
125
- verify_block: proc do |value|
126
- raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless (value and not value.empty?)
127
- end),
128
- ]
129
- end
48
+ object = Aws::S3::Object.new(
49
+ key: file_path,
50
+ bucket_name: bucket,
51
+ client: client
52
+ )
130
53
 
131
- def self.authors
132
- ["https://github.com/sroik", "https://github.com/elfenlaid"]
133
- end
54
+ url = object.public_url
134
55
 
135
- def self.output
136
- ['UPLOADED_S3_URL': 'Uploaded file s3 path']
56
+ UI.message "✨ file uploaded to #{url} ✨"
57
+ ENV[SharedValues::UPLOADED_S3_URL] = url
137
58
  end
59
+ end
138
60
 
139
- def self.is_supported?(platform)
140
- platform == :android || platform == :ios
141
- end
61
+ #####################################################
62
+ # @!group Documentation
63
+ #####################################################
64
+
65
+ def self.description
66
+ 'Upload file to S3 or Spaces'
67
+ end
68
+
69
+ def self.available_options
70
+ [
71
+ FastlaneCore::ConfigItem.new(key: :path,
72
+ env_name: 'FL_UPLOAD_S3_PATH',
73
+ description: 'Upload local path',
74
+ is_string: true,
75
+ verify_block: proc do |value|
76
+ UI.user_error!("Couldn't find file at path '#{value}'") unless File.exist?(value)
77
+ end),
78
+ FastlaneCore::ConfigItem.new(key: :region,
79
+ env_name: 'FL_UPLOAD_S3_REGION',
80
+ description: 'Region for S3 or Spaces',
81
+ is_string: true,
82
+ default_value: 'ams3',
83
+ verify_block: proc do |value|
84
+ UI.user_error!("No region for UploadToS3Action given, pass using `region: 'region'`") unless value && !value.empty?
85
+ end),
86
+ FastlaneCore::ConfigItem.new(key: :endpoint,
87
+ env_name: 'FL_UPLOAD_S3_ENDPOINT',
88
+ description: 'Endpoint for S3 or Spaces',
89
+ is_string: true,
90
+ default_value: 'https://ams3.digitaloceanspaces.com',
91
+ verify_block: proc do |value|
92
+ UI.user_error!("No Endpoint for UploadToS3Action given, pass using `endpoint: 'endpoint'`") unless value && !value.empty?
93
+ end),
94
+ FastlaneCore::ConfigItem.new(key: :access_key,
95
+ env_name: 'FL_UPLOAD_S3_ACCESS_KEY',
96
+ description: 'Access Key for S3 or Spaces',
97
+ is_string: true,
98
+ verify_block: proc do |value|
99
+ raise "No Access Key for UploadToS3Action given, pass using `access_key: 'access_key'`".red unless value && !value.empty?
100
+ end),
101
+ FastlaneCore::ConfigItem.new(key: :secret_access_key,
102
+ env_name: 'FL_UPLOAD_S3_SECRET_ACCESS_KEY',
103
+ description: 'Secret Access Key for S3 or Spaces',
104
+ is_string: true,
105
+ verify_block: proc do |value|
106
+ raise "No Secret Access Key for UploadToS3Action given, pass using `secret_access_key: 'secret_access_key'`".red unless value && !value.empty?
107
+ end),
108
+ FastlaneCore::ConfigItem.new(key: :bucket,
109
+ env_name: 'FL_UPLOAD_S3_BUCKET',
110
+ description: 'Bucket for S3 or Spaces',
111
+ is_string: true,
112
+ verify_block: proc do |value|
113
+ raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless value && !value.empty?
114
+ end),
115
+ FastlaneCore::ConfigItem.new(key: :space,
116
+ env_name: 'FL_UPLOAD_S3_SPACE',
117
+ description: 'Digital Ocean Space',
118
+ is_string: true,
119
+ default_value: 'appcraft-files'),
120
+ FastlaneCore::ConfigItem.new(key: :acl,
121
+ env_name: 'FL_UPLOAD_S3_ACL',
122
+ description: 'Access level for the file',
123
+ is_string: true,
124
+ default_value: 'public-read',
125
+ verify_block: proc do |value|
126
+ raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless value && !value.empty?
127
+ end)
128
+ ]
129
+ end
130
+
131
+ def self.authors
132
+ ['https://github.com/sroik', 'https://github.com/elfenlaid']
133
+ end
134
+
135
+ def self.output
136
+ ['UPLOADED_S3_URL': 'Uploaded file s3 path']
137
+ end
138
+
139
+ def self.is_supported?(platform)
140
+ platform == :android || platform == :ios
142
141
  end
143
142
  end
144
143
  end
144
+ end
@@ -1,3 +1,3 @@
1
1
  module FastlaneCraft
2
- VERSION = '1.3.12'.freeze
2
+ VERSION = '1.4.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-craft
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.12
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sroik
@@ -9,10 +9,10 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-12-04 00:00:00.000000000 Z
12
+ date: 2018-12-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: fastlane
15
+ name: aws-sdk-s3
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">"
@@ -26,7 +26,7 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
28
  - !ruby/object:Gem::Dependency
29
- name: aws-sdk-s3
29
+ name: fastlane
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - ">"