diff --git a/scripts/install_local_driver.sh b/scripts/install_local_driver.sh deleted file mode 100755 index e5797800..00000000 --- a/scripts/install_local_driver.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash - -set -e -set +x - -trap 'cd $(pwd -P)' EXIT -cd "$(dirname "$0")" - -CLI_VERSION=$(head -1 ./CLI_VERSION) -FILE_PREFIX=playwright-$CLI_VERSION - -cd ../driver-bundle/src/main/resources - -PLATFORM="unknown" -case $(uname) in -Darwin) - PLATFORM=mac - echo "Downloading driver for macOS" - ;; -Linux) - PLATFORM=linux - echo "Downloading driver for Linux" - ;; -MINGW64*) - PLATFORM=win32_x64 - echo "Downloading driver for Win64" - ;; -*) - echo "Unknown platform '$(uname)'" - exit 1 - ;; -esac - -mkdir -p driver -cd driver -if [[ -d $PLATFORM ]]; then - echo "$(pwd)/$PLATFORM already exists, delete it first" - exit 1 -fi -mkdir $PLATFORM -cd $PLATFORM - -FILE_NAME=$FILE_PREFIX-$PLATFORM.zip -echo "Downloading driver for $PLATFORM to $(pwd)" - -URL=https://playwright.azureedge.net/builds/driver -if [[ "$CLI_VERSION" == *-alpha* || "$CLI_VERSION" == *-beta* || "$CLI_VERSION" == *-next* ]]; then - URL=$URL/next -fi -URL=$URL/$FILE_NAME -echo "Using url: $URL" -curl -O "$URL" - -unzip "${FILE_NAME}" -d . -rm "$FILE_NAME" -./playwright-cli install diff --git a/scripts/playwright.java b/scripts/playwright.java index 39c6372c..c7e5d90e 100755 --- a/scripts/playwright.java +++ b/scripts/playwright.java @@ -1,6 +1,6 @@ ///usr/bin/env jbang "$0" "$@" ; exit $? //DEPS com.microsoft.playwright:playwright:RELEASE -//DESCRIPTION Playwright lets you automate Chromium, Firefox and Webkit with a single API. +//DESCRIPTION Playwright lets you automate Chromium, Firefox and Webkit with a single API. //DESCRIPTION With this cli you can install, trace, generate pdf and screenshots and more. //DESCRIPTION //DESCRIPTION Example on how to record and run a script: @@ -9,6 +9,7 @@ //DESCRIPTION jbang --deps com.microsoft.playwright:playwright:RELEASE Example.java //DESCRIPTION ``` +// NOTE: this file is referenced from https://github.com/microsoft/jbang-catalog/blob/702c9b4355c76ae6f7294e1aaf6f2698b03631aa/jbang-catalog.json#L17 public class playwright { public static void main(String... args) throws Exception {