-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
als upgrade package.json version + added test
- Loading branch information
1 parent
5b0c385
commit 96ef191
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"license": "MIT", | ||
"dependencies": { | ||
"@playwright/test": "1.30.0" | ||
"@playwright/test": "1.36.2" | ||
}, | ||
"scripts": {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
# Path to your Dockerfile and package.json | ||
DOCKERFILE_PATH="./Dockerfile" | ||
PACKAGE_JSON_PATH="./files/package.json" | ||
|
||
# Extract version from Dockerfile | ||
DOCKERFILE_VERSION=$(grep '^FROM' $DOCKERFILE_PATH | awk -F':' '{print $2}' | sed 's/-focal//' | sed 's/v//') | ||
|
||
# Extract version from package.json | ||
PACKAGE_JSON_VERSION=$(awk -F'"' '/@playwright\/test/ {print $4}' $PACKAGE_JSON_PATH) | ||
|
||
# Compare versions | ||
if [ "$DOCKERFILE_VERSION" = "$PACKAGE_JSON_VERSION" ]; then | ||
echo "Versions match: $DOCKERFILE_VERSION" | ||
else | ||
echo "Versions do not match. Dockerfile version: $DOCKERFILE_VERSION, package.json version: $PACKAGE_JSON_VERSION" | ||
fi |