Fix Playwright version checking
Updated method to fetch Playwright version using yarn list. `yarn info` was just querying what the latest available package is
This commit is contained in:
committed by
GitHub
parent
7698c72bbf
commit
33fbb47d93
@@ -11,10 +11,8 @@ IMAGE_NAME="element-web-playwright-common"
|
|||||||
build_image() {
|
build_image() {
|
||||||
echo "Building $IMAGE_NAME image in $SCRIPT_DIR"
|
echo "Building $IMAGE_NAME image in $SCRIPT_DIR"
|
||||||
|
|
||||||
# Fetch the playwright version
|
# Check the playwright version
|
||||||
# .data.version is for yarn classic
|
PW_VERSION=$(yarn list --pattern @playwright/test --depth=0 --json --non-interactive --no-progress | jq -r '.data.trees[].name | split("@") | last')
|
||||||
# .children.Version is for yarn berry
|
|
||||||
PW_VERSION=$(yarn info --manifest --json @playwright/test | jq -r '.data.version // .children.Version')
|
|
||||||
echo "with Playwright version $PW_VERSION"
|
echo "with Playwright version $PW_VERSION"
|
||||||
|
|
||||||
# Build image
|
# Build image
|
||||||
|
|||||||
Reference in New Issue
Block a user