mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
chore: add build stats history json file (#16168)
This commit is contained in:
parent
9372ce0ec7
commit
41e3ab189c
@ -727,6 +727,9 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
name: Run page load benchmark
|
name: Run page load benchmark
|
||||||
command: yarn mv3:stats:chrome --out test-artifacts/chrome/mv3
|
command: yarn mv3:stats:chrome --out test-artifacts/chrome/mv3
|
||||||
|
- run:
|
||||||
|
name: Install jq
|
||||||
|
command: sudo apt install jq -y
|
||||||
- run:
|
- run:
|
||||||
name: Record bundle size at commit
|
name: Record bundle size at commit
|
||||||
command: ./.circleci/scripts/bundle-stats-commit.sh
|
command: ./.circleci/scripts/bundle-stats-commit.sh
|
||||||
|
@ -50,6 +50,28 @@ cp temp/stats/bundle_size_data.temp.js temp/stats/bundle_size_data.js
|
|||||||
|
|
||||||
echo " }" >> temp/stats/bundle_size_data.js
|
echo " }" >> temp/stats/bundle_size_data.js
|
||||||
|
|
||||||
|
if [ -f temp/stats/bundle_size_data.json ]; then
|
||||||
|
# copy bundle_size_data.json in bundle_size_data.temp.json without last 2 lines
|
||||||
|
head -$(($(wc -l < temp/stats/bundle_size_data.json) - 2)) temp/stats/bundle_size_data.json > bundle_size_stats.temp.json
|
||||||
|
|
||||||
|
{
|
||||||
|
echo "},";
|
||||||
|
echo "\"$CIRCLE_SHA1\":";
|
||||||
|
cat test-artifacts/chrome/mv3/bundle_size_stats.json;
|
||||||
|
echo "}";
|
||||||
|
} >> bundle_size_stats.temp.json
|
||||||
|
else
|
||||||
|
{
|
||||||
|
echo "{";
|
||||||
|
echo "\"$CIRCLE_SHA1\":";
|
||||||
|
cat test-artifacts/chrome/mv3/bundle_size_stats.json;
|
||||||
|
echo "}";
|
||||||
|
} > bundle_size_stats.temp.json
|
||||||
|
fi
|
||||||
|
|
||||||
|
jq < bundle_size_stats.temp.json > temp/stats/bundle_size_data.json
|
||||||
|
rm bundle_size_stats.temp.json
|
||||||
|
|
||||||
cd temp
|
cd temp
|
||||||
|
|
||||||
git add .
|
git add .
|
||||||
|
Loading…
Reference in New Issue
Block a user