fastlane-plugin-emerge 0.1.0 → 0.1.2

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: 38e505be053a5c439e55a3c8ed9d69af31dd2da2f09607225153dd993170fa26
4
- data.tar.gz: 18c009df84980d664ef8dc02e6bd80511ff0b23e5671c5ea63be2f16c7cc6f20
3
+ metadata.gz: dda786064d85f768f1b3ee843a5de6d6e38302fbc0684fe5f8ec575665b027d9
4
+ data.tar.gz: f01ab9a333656d2e92fdc2ac7a4f099bfca70c1a8c10b96619666f55441d292c
5
5
  SHA512:
6
- metadata.gz: da48395fc4262b8a7055c4cf72ca54cac99c2b1f4b8061602949922f328db5daf26d75b80d949983a0387b88ad36c429380e4626b15f58e7dc4fbbdc8f1d79fe
7
- data.tar.gz: b35f798827f5927c55b9d61fbf132ee28e47fb354e35112399d400478b8d215aa3d2fdc47db378d22b7d9f138d17bb868de3dfdf1949f8880f623c99c9c22ea6
6
+ metadata.gz: c598ae3b76daba26c2bbb78c619a160822cb8610e8c5db90e3ae45565b01b9fde4382477aa0db568349c00e2a9cc4abffbf5371ed308c21bb458db0d5bdfd076
7
+ data.tar.gz: fac3984e30f2e0853b9d9dccdc9b86d8bc70a47f97fc21f5c8b84892b4752d75bab281726654cc856837932d75428329cb94e533b581bf307921a877c6b32552
@@ -7,14 +7,35 @@ module Fastlane
7
7
  def self.run(params)
8
8
  api_token = params[:api_token]
9
9
  file_path = params[:file_path]
10
+ pr_number = params[:pr_number]
11
+ build_id = params[:build_id]
12
+ base_build_id = params[:base_build_id]
13
+ repo_name = params[:repo_name]
14
+ build_type = params[:build_type]
10
15
  if !File.exist?(file_path) || !File.extname(file_path) == '.zip'
11
16
  UI.error("Invalid input file")
12
17
  return
13
18
  end
14
19
 
15
20
  fileName = File.basename(file_path)
16
- url = 'https://2b32vitohk.execute-api.us-west-1.amazonaws.com/getUpload'
17
- resp = Faraday.get(url, {fileName: fileName}, {'X-API-Token' => api_token})
21
+ url = 'https://api.emergetools.com/getUpload'
22
+ params = {
23
+ fileName: fileName,
24
+ }
25
+ if pr_number
26
+ params[:prNumber] = pr_number
27
+ end
28
+ if build_id
29
+ params[:buildId] = build_id
30
+ end
31
+ if base_build_id
32
+ params[:baseBuildId] = base_build_id
33
+ end
34
+ if repo_name
35
+ params[:repoName] = repo_name
36
+ end
37
+ params[:buildType] = build_type || "development"
38
+ resp = Faraday.get(url, params, {'X-API-Token' => api_token})
18
39
  case resp.status
19
40
  when 200
20
41
  json = JSON.parse(resp.body)
@@ -56,6 +77,26 @@ module Fastlane
56
77
  env_name: "EMERGE_FILE_PATH",
57
78
  description: "Path to the zipped xcarchive or app to upload",
58
79
  optional: false,
80
+ type: String),
81
+ FastlaneCore::ConfigItem.new(key: :pr_number,
82
+ description: "The PR number that triggered this upload",
83
+ optional: true,
84
+ type: String),
85
+ FastlaneCore::ConfigItem.new(key: :build_id,
86
+ description: "A string to identify this build",
87
+ optional: true,
88
+ type: String),
89
+ FastlaneCore::ConfigItem.new(key: :base_build_id,
90
+ description: "Id of the build to compare with this upload",
91
+ optional: true,
92
+ type: String),
93
+ FastlaneCore::ConfigItem.new(key: :repo_name,
94
+ description: "Full name of the respository this upload was triggered from. For example: EmergeTools/Emerge",
95
+ optional: true,
96
+ type: String),
97
+ FastlaneCore::ConfigItem.new(key: :build_type,
98
+ description: "Type of build, either release or development. Defaults to development",
99
+ optional: true,
59
100
  type: String)
60
101
  ]
61
102
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Emerge
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-emerge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emerge Tools, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-09 00:00:00.000000000 Z
11
+ date: 2021-02-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday