Skip to content

Commit

Permalink
Merge xml files
Browse files Browse the repository at this point in the history
  • Loading branch information
rolfbjarne committed Dec 19, 2019
1 parent 788556b commit 1b847a1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tools/devops/push-performance-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,22 @@ mv ./*/*.zip .
for zip in ./*.zip; do
unzip "$zip"
done
rm -f ./*.zip

git add .
# Merge each individual xml file into one big xml file
DIR=perf-data/samples/$BUILD_SOURCEBRANCHNAME/$BUILD_SOURCEVERSION
cd "$DIR"
{
echo '<?xml version="1.0" encoding="utf-8" standalone="yes"?>'
echo '<performance>'
find . -name '*perfdata*.xml' -print0 | xargs -0 -n 1 tail -n +2 | grep -F -v -e '<performance>' -e '</performance>'
echo '</performance>'
} > data.xml

# Add the big xml file to git
git add data.xml
git commit -m "Add performance data for $BUILD_SOURCEBRANCHNAME/$BUILD_SOURCEVERSION."

# Push!
# Try to push 5 times, just in case someone else pushed first.
COUNTER=5
while [[ $COUNTER -gt 0 ]]; do
Expand Down

1 comment on commit 1b847a1

@xamarin-release-manager

This comment was marked as outdated.

Please sign in to comment.