Skip to content
Snippets Groups Projects
Commit 27fe7a38 authored by Bartek Wrona's avatar Bartek Wrona
Browse files

Added filtering out non-json output produced by pnpm --json option, what leads...

Added filtering out non-json output produced by pnpm --json option, what leads further processing to fail.
parent 853360e2
No related branches found
No related tags found
1 merge request!73Remove tail from npm pack package script
......@@ -15,7 +15,8 @@ pushd "${SOURCE_DIR}" # move to the project directory (where package.json file i
"${SCRIPTPATH}/npm_generate_version.sh" "${SOURCE_DIR}" "${REGISTRY_URL}" "${SCOPE}" "${PROJECT_NAME}" "${COMMIT_REF_PROTECTED}" "${COMMIT_TAG}"
pnpm pack --pack-destination "${OUTPUT_DIR}" --json > "${OUTPUT_DIR}/built_package_info.json"
# warning pnpm prints additional (non json) lines referencing prepack actions done while packing. They start from `>` and must be filtered out before processing by jq
pnpm pack --pack-destination "${OUTPUT_DIR}" --json | grep -v '^>.*$' > "${OUTPUT_DIR}/built_package_info.json"
BUILT_PACKAGE_NAME=$(jq -r .filename "${OUTPUT_DIR}/built_package_info.json")
{
echo PACKAGE_SOURCE_DIR="${SOURCE_DIR}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment