From 3bc4af9496c8a8310a14239e746e398e2ea28120 Mon Sep 17 00:00:00 2001 From: Albert Ho Date: Thu, 14 Nov 2024 13:51:04 -0800 Subject: [PATCH] sed replace first occurence only --- .github/workflows/ios-perf.yml | 3 ++- script/automation/browserstack.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ios-perf.yml b/.github/workflows/ios-perf.yml index 19c40fc..ecf07d8 100644 --- a/.github/workflows/ios-perf.yml +++ b/.github/workflows/ios-perf.yml @@ -52,7 +52,8 @@ jobs: PerformanceTest/PerformanceTest.swift - name: Inject Performance Threshold - run: sed -i '.bak' 's:{PERFORMANCE_THRESHOLD_SEC}:${{ matrix.performanceThresholdSec }}:' + run: sed -i '.bak' + '0,/{PERFORMANCE_THRESHOLD_SEC}/s/{PERFORMANCE_THRESHOLD_SEC}/${{ matrix.performanceThresholdSec }}/' PerformanceTest/PerformanceTest.swift - name: XCode Build diff --git a/script/automation/browserstack.py b/script/automation/browserstack.py index 6f7dc92..7dfc775 100644 --- a/script/automation/browserstack.py +++ b/script/automation/browserstack.py @@ -75,6 +75,7 @@ def main(args: argparse.Namespace) -> None: if not build_response.ok: print('Build Failed', build_response_json) + print('Build Response', build_response) exit(1) if build_response_json['message'] != 'Success':