diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a6cc54..68c3ae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,3 @@ -- BUGFIX - - Fix `yq` syntax after upgrade to v4 +- ENHANCEMENT + - Update dependency mikefarah/yq to v4.1.0 + - Use `yq` native alternative syntax diff --git a/overlay/usr/bin/lhci b/overlay/usr/bin/lhci index 903501e..0aa3d25 100755 --- a/overlay/usr/bin/lhci +++ b/overlay/usr/bin/lhci @@ -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 e '.ci.upload.target' "${CONFIG}") - UPLOAD_OUTPUT_DIR=$(yq e '.ci.upload.outputDir' "${CONFIG}") + UPLOAD_TARGET=$(yq e '.ci.upload.target // ""' "${CONFIG}") + UPLOAD_OUTPUT_DIR=$(yq e '.ci.upload.outputDir // ""' "${CONFIG}") - if [ "${UPLOAD_TARGET}" = "filesystem" ] && [ "${UPLOAD_OUTPUT_DIR:-null}" != "null" ] ; then + if [ "${UPLOAD_TARGET}" = "filesystem" ] && [ -n "${UPLOAD_OUTPUT_DIR}" ] ; then MANIFEST=${UPLOAD_OUTPUT_DIR%/}/manifest.json DIST="${LHCI_BASE_DIR%/}/${UPLOAD_OUTPUT_DIR%/}/dist" mkdir -p "${DIST}"