fastlane-plugin-stream_actions 0.4.22 → 0.4.23

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: 4784999ab4dfa4274ec20304e8ff6f1e1228cc583a91e6ab4127a102cc34027f
4
- data.tar.gz: 1853aa6c5258f011f768edbf4683dcca02b5081805c8d6e5e9169595e0e58272
3
+ metadata.gz: 6bd49d93c5278338894b7f0a1f451c50604b8563a214cf130a35bdb004a55570
4
+ data.tar.gz: e152e43d0b966453bd03b9d8427b031cbcb79e337017f7fe7270c5c88a35d975
5
5
  SHA512:
6
- metadata.gz: 9236659fd7094336030f5994005e57a71e7b4a1d693aa3cc9a918fefd8b01bcf17b09d1b3fb3c0ca8ed3c0527622c52ceb4a7181b2cce7f4e5fb62aaa5e951f5
7
- data.tar.gz: 7527de60fc668057e9ed3b1231174ad7999e6390346c7d6f63966cb41efc27bff7e35d633788080da9c04dca043c3bd0b93f2b57936767588dca997477c02bd3
6
+ metadata.gz: 971a3fb19005a51d3a7c6c238e5502d3c126ee3cd3a11149947ec88da572404f78fcbe3e6c5b37c7401b77b3cb187caf2260660735db5988fcb3aba4c4a75b26
7
+ data.tar.gz: 5c21de0d3d091550d84f3e48ac48152cd93a01b991a70620c9102b53e165925c9433513ead4581c654072839164d58caf992635fab963a5acb1777efed8ed8b5
@@ -1,3 +1,5 @@
1
+ require 'base64'
2
+
1
3
  module Fastlane
2
4
  module Actions
3
5
  class CustomMatchAction < Action
@@ -9,17 +11,30 @@ module Fastlane
9
11
  params[:readonly] = false
10
12
  end
11
13
 
14
+ auth = git_authorization(params[:git_token])
12
15
  %w[development adhoc appstore].each do |type|
13
- other_action.match(
16
+ options = {
14
17
  api_key: params[:api_key],
15
18
  type: type,
16
19
  app_identifier: params[:app_identifier],
17
20
  readonly: params[:readonly],
18
21
  force_for_new_devices: !other_action.is_ci
19
- )
22
+ }
23
+ options[:git_basic_authorization] = auth if auth
24
+ other_action.match(**options)
20
25
  end
21
26
  end
22
27
 
28
+ # Basic auth header value for cloning the certificates repo over HTTPS.
29
+ def self.git_authorization(token)
30
+ return nil if token.to_s.empty?
31
+
32
+ auth = Base64.strict_encode64("x-access-token:#{token}")
33
+ # match can print its git command, so hide the header in CI logs.
34
+ $stdout.puts("::add-mask::#{auth}") if ENV['GITHUB_ACTIONS'] == 'true'
35
+ auth
36
+ end
37
+
23
38
  #####################################################
24
39
  # @!group Documentation
25
40
  #####################################################
@@ -52,6 +67,13 @@ module Fastlane
52
67
  default_value: true,
53
68
  description: 'If `readonly: true` (by default), installs all Certs and Profiles necessary for development and ad-hoc.\nIf `readonly: false`, recreates all Profiles necessary for development and ad-hoc, updates them locally and remotely'
54
69
  ),
70
+ FastlaneCore::ConfigItem.new(
71
+ env_name: 'MATCH_GIT_TOKEN',
72
+ key: :git_token,
73
+ description: 'GitHub token that can read the certificates repo over HTTPS. Without it, match uses your git credentials',
74
+ sensitive: true,
75
+ optional: true
76
+ ),
55
77
  FastlaneCore::ConfigItem.new(
56
78
  key: :register_device,
57
79
  is_string: false,
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module StreamActions
3
- VERSION = '0.4.22'
3
+ VERSION = '0.4.23'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-stream_actions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.22
4
+ version: 0.4.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - GetStream