Extract the install path from the install step falling back to 'which'

pull/959/head
Morgan Pretty 2 years ago
parent 3bdebb4fbe
commit 6fd1e48637

@ -179,9 +179,13 @@ local update_cocoapods_cache(depends_on) = {
{ {
name: 'Install Codecov CLI', name: 'Install Codecov CLI',
commands: [ commands: [
'pip3 install codecov-cli', 'pip3 install codecov-cli 2>&1 | grep "The script codecovcli is installed in" | sed -n -e "s/^.*The script codecovcli is installed in \(.*\) which is not on PATH.*$/\1/p" > ./build/artifacts/codecov_install_path',
'pip3 show codecov-cli', |||
'$(pip3 show codecov-cli | grep Location | sed "s/Location: //")/codecovcli --version' if [[ ! -s ./build/artifacts/codecov_install_path ]]; then
which codecovcli > ./build/artifacts/codecov_install_path
fi
|||
'$(cat ./build/artifacts/codecov_install_path)/codecovcli --version'
], ],
}, },
{ {
@ -194,7 +198,7 @@ local update_cocoapods_cache(depends_on) = {
{ {
name: 'Upload coverage to Codecov', name: 'Upload coverage to Codecov',
commands: [ commands: [
'codecovcli upload-process --fail-on-error -f ./build/artifacts/coverage.xml', '$(cat ./build/artifacts/codecov_install_path)/codecovcli upload-process --fail-on-error -f ./build/artifacts/coverage.xml',
], ],
depends_on: [ depends_on: [
'Convert xcresult to xml', 'Convert xcresult to xml',

Loading…
Cancel
Save