fix yq syntax
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Robert Kaussow 2020-12-20 23:30:44 +01:00
parent ba1b490f51
commit af8cdc5260
Signed by: xoxys
GPG Key ID: 65362AE74AF98B61
2 changed files with 5 additions and 5 deletions

View File

@ -1,2 +1,2 @@
- ENHANCEMENT
- Update dependency mikefarah/yq to v4
- BUGFIX
- Fix `yq` syntax after upgrade to v4

View File

@ -7,10 +7,10 @@ exec 5>&1
OUT=$(/usr/local/bin/lhci "$@" | tee /dev/fd/5) || ERROR=true
if [ -f "$CONFIG" ] && echo "$OUT" | grep -q "Done running Lighthouse"; then
UPLOAD_TARGET=$(yq r "${CONFIG}" --defaultValue "" ci.upload.target)
UPLOAD_OUTPUT_DIR=$(yq r "${CONFIG}" --defaultValue "" ci.upload.outputDir)
UPLOAD_TARGET=$(yq e '.ci.upload.target' "${CONFIG}")
UPLOAD_OUTPUT_DIR=$(yq e '.ci.upload.outputDir' "${CONFIG}")
if [ "${UPLOAD_TARGET}" = "filesystem" ] && [ -n "${UPLOAD_OUTPUT_DIR}" ] ; then
if [ "${UPLOAD_TARGET}" = "filesystem" ] && [ "${UPLOAD_OUTPUT_DIR:-null}" != "null" ] ; then
MANIFEST=${UPLOAD_OUTPUT_DIR%/}/manifest.json
DIST="${LHCI_BASE_DIR%/}/${UPLOAD_OUTPUT_DIR%/}/dist"
mkdir -p "${DIST}"