Skip to content

Commit

Permalink
scripts: Fix coverage information downloading script
Browse files Browse the repository at this point in the history
Fix COVERAGE_DIR parsing from results by using the `-m 1` option in
`grep` command to limit the output to a single match.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
  • Loading branch information
ansasaki committed Feb 14, 2025
1 parent 78828ae commit 707e9ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/download_packit_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ fi
# now we have TF_ARTIFACTS_URL so we can proceed with the download
echo "TF_ARTIFACTS_URL=${TF_ARTIFACTS_URL}"

COVERAGE_DIR=$( curl --retry 5 ${TF_ARTIFACTS_URL}/results.xml | grep -E -o "${TF_ARTIFACTS_URL}.*${TF_COVERAGE_DATA_DIR}" )
COVERAGE_DIR=$( curl --retry 5 ${TF_ARTIFACTS_URL}/results.xml | grep -E -m 1 -o "${TF_ARTIFACTS_URL}.*${TF_COVERAGE_DATA_DIR}" )
echo "COVERAGE_DIR=${COVERAGE_DIR}"

DOWNLOADED="False"
Expand Down

0 comments on commit 707e9ae

Please sign in to comment.