fastlane-craft 1.3.6 → 1.3.7

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
  SHA256:
3
- metadata.gz: dad9876c7dbe79f6a415b7a5d60b1f50f6470c5889a82ab3940a19ba63e6f9fc
4
- data.tar.gz: b614e7eca0d62685531a7fd8845fb9f26a578bc22271a1e41705be6ac4e5c822
3
+ metadata.gz: 36cf8fe410f85f7ee81509abe5a10f8a08c55216bd24e453f132b9cbc6bab9b2
4
+ data.tar.gz: 0ddddc8db48fb0114c20b169ea2bc45d63229626b802f4da4563b6ca200744f6
5
5
  SHA512:
6
- metadata.gz: cab1baa1a89e0b1415c5da711f7e5fc2d6b069d2cf60706bcfd0fee9c12dc5641e21ce04a03eb74232f373441e2f9713e6d38b74dc5a16ff0ee99872eba5bbe9
7
- data.tar.gz: 9f9a2f8dbf5b360b1363c897fec6b2d6426ee900f9ee0a43792e0bc4e9d3f4de70e9e86e0f11ed4a7d58724fafeeafbf05217c70cadaa53ea6e84f413738f81a
6
+ metadata.gz: 258506d68701658f10592d6e0e87b4897169f172ebb27fbbef84d974acc329c6798b553c12593ba39c9c192197c9ace8e7888bdc681d6f482d7cbbbdfbaf5e5f
7
+ data.tar.gz: 0ea06078ee8f0250424c02bd7647803232950d24f082be4702d179fa099a63ca33adc354f31d20ab005fd92a063a63356ea0ea669bf71eb6ce17d103ed63a396
@@ -1,6 +1,7 @@
1
1
  require_relative 'fastlane-craft/version'
2
2
  require_relative 'fastlane-craft/telegram'
3
3
  require_relative 'fastlane-craft/app_release'
4
+ require_relative 'fastlane-craft/upload_dsym'
4
5
 
5
6
  module FastlaneCraft
6
7
  end
@@ -0,0 +1,146 @@
1
+ module Fastlane
2
+ module Actions
3
+ class UploadDsymAction < Action
4
+ def self.run(params)
5
+ require 'aws-sdk-s3'
6
+
7
+ kind = params[:kind]
8
+ version = params[:version]
9
+ dsym_path = params[:dSYM]
10
+ dsym_name = File.basename(dsym_path, ".*")
11
+ dsym_ext = File.extname(dsym_path)
12
+
13
+ bucket = params[:space] || params[:bucket]
14
+ acl = params[:acl]
15
+ file_key = [dsym_name, kind, version].join('_') + dsym_ext
16
+ file_path = params[:space] ? params[:bucket] + '/' + file_key : file_key
17
+
18
+ client = Aws::S3::Client.new(
19
+ access_key_id: params[:access_key],
20
+ secret_access_key: params[:secret_access_key],
21
+ endpoint: params[:endpoint],
22
+ region: params[:region]
23
+ )
24
+
25
+ UI.message "Check whether destination bucket #{bucket} exists..💤"
26
+ begin
27
+ response = client.create_bucket({
28
+ bucket: bucket,
29
+ acl: acl
30
+ })
31
+ UI.message "Bucket #{bucket} created! ✨"
32
+ rescue Aws::S3::Errors::BucketAlreadyExists
33
+ UI.message "Bucket #{bucket} alredy exists 👌"
34
+ end
35
+
36
+ UI.message "Going to upload dSYM..💤"
37
+ File.open(dsym_path, 'r') do |body|
38
+ response = client.put_object(
39
+ acl: acl,
40
+ bucket: bucket,
41
+ key: file_path,
42
+ body: body
43
+ )
44
+
45
+ UI.message "dSYM uploaded to #{file_path} ✨"
46
+ end
47
+ end
48
+
49
+ #####################################################
50
+ # @!group Documentation
51
+ #####################################################
52
+
53
+ def self.description
54
+ "Upload dSYM archive to S3 or Spaces"
55
+ end
56
+
57
+ def self.available_options
58
+ [
59
+ FastlaneCore::ConfigItem.new(key: :kind,
60
+ env_name: "FL_UPLOAD_DSYM_KIND",
61
+ description: "Origin of the dSYM ('Beta', 'Release', etc)",
62
+ is_string: true,
63
+ default_value: ENV['BITRISE_TRIGGERED_WORKFLOW_TITLE'],
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?)
66
+ end),
67
+ FastlaneCore::ConfigItem.new(key: :version,
68
+ env_name: "FL_UPLOAD_DSYM_VERSION",
69
+ description: "Version of a constructed .ipa. (Build number '321', App version '1.2.3', etc.)",
70
+ is_string: true,
71
+ default_value: ENV['APP_RELEASE_BUILD_NUMBER'] || ENV['BITRISE_BUILD_NUMBER'],
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?)
74
+ end),
75
+ FastlaneCore::ConfigItem.new(key: :dSYM,
76
+ env_name: "FL_UPLOAD_DSYM_PATH",
77
+ description: "Archived dSYM files",
78
+ is_string: true,
79
+ default_value: ENV['DSYM_OUTPUT_PATH'],
80
+ verify_block: proc do |value|
81
+ UI.user_error!("Couldn't find dSYM file at path '#{value}'") unless File.exist?(value)
82
+ end),
83
+ FastlaneCore::ConfigItem.new(key: :region,
84
+ env_name: "FL_UPLOAD_DSYM_REGION",
85
+ description: "Region for S3 or Spaces",
86
+ is_string: true,
87
+ default_value: 'ams3',
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?)
90
+ end),
91
+ FastlaneCore::ConfigItem.new(key: :endpoint,
92
+ env_name: "FL_UPLOAD_DSYM_ENDPOINT",
93
+ description: "Endpoint for S3 or Spaces",
94
+ is_string: true,
95
+ default_value: 'https://ams3.digitaloceanspaces.com',
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?)
98
+ end),
99
+ FastlaneCore::ConfigItem.new(key: :access_key,
100
+ env_name: "FL_UPLOAD_DSYM_S3_ACCESS_KEY",
101
+ description: "Access Key for S3 or Spaces",
102
+ is_string: true,
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?)
105
+ end),
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",
109
+ is_string: true,
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?)
112
+ end),
113
+ FastlaneCore::ConfigItem.new(key: :bucket,
114
+ env_name: "FL_UPLOAD_DSYM_S3_BUCKET",
115
+ description: "Bucket for S3 or Spaces",
116
+ is_string: true,
117
+ default_value: 'default',
118
+ verify_block: proc do |value|
119
+ raise "No Bucket for UploadToS3Action given, pass using `bucket: 'bucket'`".red unless (value and not value.empty?)
120
+ end),
121
+ FastlaneCore::ConfigItem.new(key: :space,
122
+ env_name: "FL_UPLOAD_DSYM_SPACE",
123
+ description: "Digital Ocean Space",
124
+ is_string: true,
125
+ default_value: 'appcraft-dsym'),
126
+ FastlaneCore::ConfigItem.new(key: :acl,
127
+ env_name: "FL_UPLOAD_DSYM_S3_ACL",
128
+ description: "Access level for the file",
129
+ is_string: true,
130
+ default_value: "private",
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),
134
+ ]
135
+ end
136
+
137
+ def self.authors
138
+ ["https://github.com/sroik", "https://github.com/elfenlaid"]
139
+ end
140
+
141
+ def self.is_supported?(platform)
142
+ platform == :ios
143
+ end
144
+ end
145
+ end
146
+ end
@@ -1,3 +1,3 @@
1
1
  module FastlaneCraft
2
- VERSION = '1.3.6'.freeze
2
+ VERSION = '1.3.7'.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.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - sroik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-03-21 00:00:00.000000000 Z
12
+ date: 2018-07-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fastlane
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - ">"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: aws-sdk-s3
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">"
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">"
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: bundler
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -121,6 +135,7 @@ files:
121
135
  - lib/fastlane-craft/info_plist_controller.rb
122
136
  - lib/fastlane-craft/telegram.rb
123
137
  - lib/fastlane-craft/telegram_notifier.rb
138
+ - lib/fastlane-craft/upload_dsym.rb
124
139
  - lib/fastlane-craft/version.rb
125
140
  homepage: https://github.com/app-craft/fastlane-craft.git
126
141
  licenses: