fastlane-plugin-stream_actions 0.4.20 → 0.4.21
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 +4 -4
- data/lib/fastlane/plugin/stream_actions/actions/clone_internal_metrics.rb +50 -0
- data/lib/fastlane/plugin/stream_actions/actions/show_detailed_sdk_size.rb +1 -1
- data/lib/fastlane/plugin/stream_actions/actions/show_sdk_size.rb +1 -1
- data/lib/fastlane/plugin/stream_actions/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 48ca81e9bd133417043b2f7e747759ab7af1a284488b6a37869c87f5387e2be2
|
|
4
|
+
data.tar.gz: 7656e626ea44d19f7e9a3d03dcc40d3d1cf2d77ec821874d62dff38e121f7cdb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8e3d2f4a84a4ee8e31b3605280818e1027b593d8550c54855e8fe73c941ddefdda081ed86d4c2836571ca5c9ff0ce3361cddf20b9b5e8d5fe4e36cb755a794b
|
|
7
|
+
data.tar.gz: 69e2b1a6996cc65b77574a7221aebf8790a2be31097c69c55b3004c4021049da4c7604e1a151704126a2d43eb41283712324e68c643c7f628fa61358b34e2dd6
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
require 'shellwords'
|
|
2
|
+
|
|
3
|
+
module Fastlane
|
|
4
|
+
module Actions
|
|
5
|
+
class CloneInternalMetricsAction < Action
|
|
6
|
+
REPO = 'github.com/GetStream/stream-internal-metrics.git'.freeze
|
|
7
|
+
|
|
8
|
+
def self.run(params)
|
|
9
|
+
token = params[:github_token].to_s
|
|
10
|
+
# Without a token, keep the SSH URL that local runs rely on.
|
|
11
|
+
url = token.empty? ? "git@#{REPO.sub('/', ':')}" : "https://x-access-token:#{token}@#{REPO}"
|
|
12
|
+
UI.message("Cloning #{REPO} into #{params[:path]}")
|
|
13
|
+
# The URL can hold a token, so keep it out of the log and errors.
|
|
14
|
+
sh(
|
|
15
|
+
"git clone #{url.shellescape} #{params[:path].shellescape}",
|
|
16
|
+
print_command: false,
|
|
17
|
+
error_callback: ->(_) { UI.user_error!("Failed to clone #{REPO}") }
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
#####################################################
|
|
22
|
+
# @!group Documentation
|
|
23
|
+
#####################################################
|
|
24
|
+
|
|
25
|
+
def self.description
|
|
26
|
+
'Clones GetStream/stream-internal-metrics, over HTTPS when a token is available'
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def self.available_options
|
|
30
|
+
[
|
|
31
|
+
FastlaneCore::ConfigItem.new(
|
|
32
|
+
key: :path,
|
|
33
|
+
description: 'Directory to clone into'
|
|
34
|
+
),
|
|
35
|
+
FastlaneCore::ConfigItem.new(
|
|
36
|
+
env_name: 'GITHUB_TOKEN',
|
|
37
|
+
key: :github_token,
|
|
38
|
+
description: 'Token with access to stream-internal-metrics. Without it, the SSH URL is used',
|
|
39
|
+
sensitive: true,
|
|
40
|
+
optional: true
|
|
41
|
+
)
|
|
42
|
+
]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def self.is_supported?(platform)
|
|
46
|
+
true
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -6,7 +6,7 @@ module Fastlane
|
|
|
6
6
|
is_push_to_base_branch = ENV['GITHUB_EVENT_NAME'].to_s == 'push' && other_action.current_branch == params[:base_branch]
|
|
7
7
|
metrics_dir = 'metrics'
|
|
8
8
|
FileUtils.remove_dir(metrics_dir, force: true)
|
|
9
|
-
|
|
9
|
+
other_action.clone_internal_metrics(path: metrics_dir)
|
|
10
10
|
|
|
11
11
|
params[:sdk_names].each do |sdk|
|
|
12
12
|
metrics_path = "metrics/linkmaps/#{sdk}.json"
|
|
@@ -11,7 +11,7 @@ module Fastlane
|
|
|
11
11
|
metrics_dir = 'metrics'
|
|
12
12
|
FileUtils.remove_dir(metrics_dir, force: true)
|
|
13
13
|
sdk_size_path = "#{metrics_dir}/#{params[:github_repo].split('/').last}-size.json"
|
|
14
|
-
|
|
14
|
+
other_action.clone_internal_metrics(path: metrics_dir)
|
|
15
15
|
is_release = other_action.current_branch.include?('release/')
|
|
16
16
|
is_push_to_base_branch = ENV['GITHUB_EVENT_NAME'].to_s == 'push' && other_action.current_branch == params[:base_branch]
|
|
17
17
|
benchmark_config = JSON.parse(File.read(sdk_size_path))
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fastlane-plugin-stream_actions
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.21
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- GetStream
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: xctest_list
|
|
@@ -235,6 +235,7 @@ files:
|
|
|
235
235
|
- lib/fastlane/plugin/stream_actions/actions/build_app_for_ios_simulator.rb
|
|
236
236
|
- lib/fastlane/plugin/stream_actions/actions/build_test_coverage_map.rb
|
|
237
237
|
- lib/fastlane/plugin/stream_actions/actions/check_unsafe_flags.rb
|
|
238
|
+
- lib/fastlane/plugin/stream_actions/actions/clone_internal_metrics.rb
|
|
238
239
|
- lib/fastlane/plugin/stream_actions/actions/core_version.rb
|
|
239
240
|
- lib/fastlane/plugin/stream_actions/actions/current_branch.rb
|
|
240
241
|
- lib/fastlane/plugin/stream_actions/actions/custom_match.rb
|