diff --git a/scripts/CLI_VERSION b/scripts/CLI_VERSION new file mode 100644 index 00000000..00b07311 --- /dev/null +++ b/scripts/CLI_VERSION @@ -0,0 +1 @@ +0.170.0-next.1607022026758 diff --git a/scripts/download_driver_for_all_platforms.sh b/scripts/download_driver_for_all_platforms.sh index 19000f5d..8b5cf82b 100755 --- a/scripts/download_driver_for_all_platforms.sh +++ b/scripts/download_driver_for_all_platforms.sh @@ -3,12 +3,19 @@ set -e set +x -FILE_PREFIX=playwright-cli-0.170.0-next.1607022026758 - trap "cd $(pwd -P)" EXIT cd "$(dirname $0)" +CLI_VERSION=$(head -1 ./CLI_VERSION) +FILE_PREFIX=playwright-cli-$CLI_VERSION + cd ../driver-bundle/src/main/resources + +if [[ $1 == '-f' ]]; then + echo "Deleting existing drivers from $(pwd)" + rm -rf driver +fi + mkdir -p driver cd driver diff --git a/scripts/install_local_driver.sh b/scripts/install_local_driver.sh index 684fb2bb..de6f9546 100755 --- a/scripts/install_local_driver.sh +++ b/scripts/install_local_driver.sh @@ -3,11 +3,12 @@ set -e set +x -FILE_PREFIX=playwright-cli-0.170.0-next.1607022026758 - trap "cd $(pwd -P)" EXIT cd "$(dirname $0)" +CLI_VERSION=$(head -1 ./CLI_VERSION) +FILE_PREFIX=playwright-cli-$CLI_VERSION + cd ../driver/src/main/resources if [[ -d local-driver ]]; then echo "$(pwd)/driver already exists, delete it first"