Skip to content

Commit

Permalink
fix: Make the orb compatible with Apline Linux executors
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaTP committed Sep 2, 2020
1 parent 6011393 commit f4f3ce8
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions orbs/commands/send_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ steps:
export CODACY_REPORTER_VERSION=<< parameters.tool_version >>
export CODACY_PROJECT_TOKEN=<< parameters.project-token >>
# comma separated list of report files
report_list=<< parameters.coverage-reports >>
# reference from https://unix.stackexchange.com/a/191125
# plus https://stackoverflow.com/a/20323801/7898052
report_array=$(printf "<< parameters.coverage-reports >>" | cut -d',' -f1)
IFS=','
report_array=$report_list
params=''
for report in $report_array
do
Expand All @@ -38,12 +38,20 @@ steps:
fi
done
if [ << parameters.skip >> ]
then
if << parameters.skip >>; then
skip_option="--skip"
else
skip_option=""
fi
bash <(curl -Ls https://coverage.codacy.com/get.sh) report $params --partial $skip_option &&\
bash <(curl -Ls https://coverage.codacy.com/get.sh) final $skip_option
if [ -x "$(which curl)" ]; then
curl -Ls https://coverage.codacy.com/get.sh > get.sh
elif [ -x "$(which wget)" ] ; then
wget -qO - https://coverage.codacy.com/get.sh > get.sh
else
printf "Could not find curl or wget, please install one."
fi
source get.sh report $params --partial $skip_option &&\
source get.sh final $skip_option

0 comments on commit f4f3ce8

Please sign in to comment.