From b79e5a0625b060d12ef1d6f34b6cbc9861f426a8 Mon Sep 17 00:00:00 2001 From: Peter-Laws Date: Mon, 27 Jan 2025 16:40:18 +0000 Subject: [PATCH 1/3] Fix for moved doc --- Scripts/Flyway_DownloadAndInstallCLI.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Scripts/Flyway_DownloadAndInstallCLI.ps1 b/Scripts/Flyway_DownloadAndInstallCLI.ps1 index 5896ed3..8f483ec 100644 --- a/Scripts/Flyway_DownloadAndInstallCLI.ps1 +++ b/Scripts/Flyway_DownloadAndInstallCLI.ps1 @@ -1,6 +1,6 @@ $ErrorActionPreference = "Stop" -# Flyway Version to Use (Check for latest version: https://documentation.red-gate.com/fd/command-line-184127404.html) +# Flyway Version to Use (Check for latest version: https://documentation.red-gate.com/flyway/reference/usage/command-line.html) if ($null -ne ${env:FLYWAY_VERSION}) { # Environment Variables - Use these if set as a variable - Target Database Connection Details Write-Output "Using Environment Variables for Flyway CLI Version Number" @@ -35,13 +35,13 @@ if ($null -ne ${env:FLYWAY_PATH_LOCATION}) { } # Fetch the content of the web page -Write-Output "Analysing https://documentation.red-gate.com/fd/command-line-277579359.html for Latest Version Number" +Write-Output "Analysing https://documentation.red-gate.com/flyway/reference/usage/command-line.html for Latest Version Number" # Check if $flywayVersion is 'latest' (case-insensitive) if ($flywayVersion -ieq "latest") { # Fetch the content of the web page try { # Define the URL to fetch and fetch page content - $url = "https://documentation.red-gate.com/fd/command-line-277579359.html" + $url = "https://documentation.red-gate.com/flyway/reference/usage/command-line.html" $response = Invoke-WebRequest -Uri $url -UseBasicParsing $content = $response.Content From 31c0fd206d16c57f6ac42137f244e290c6d3c8e3 Mon Sep 17 00:00:00 2001 From: Peter-Laws Date: Mon, 27 Jan 2025 16:46:57 +0000 Subject: [PATCH 2/3] and for Unix too --- Scripts/Flyway_DownloadAndInstallCLI_Unix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/Flyway_DownloadAndInstallCLI_Unix.sh b/Scripts/Flyway_DownloadAndInstallCLI_Unix.sh index 7af9b6a..9713359 100644 --- a/Scripts/Flyway_DownloadAndInstallCLI_Unix.sh +++ b/Scripts/Flyway_DownloadAndInstallCLI_Unix.sh @@ -22,7 +22,7 @@ get_installed_version() { # Function to get the latest version from the website get_latest_version_from_website() { # Fetch the webpage content - content=$(curl -s https://documentation.red-gate.com/fd/command-line-277579359.html) + content=$(curl -s https://documentation.red-gate.com/flyway/reference/usage/command-line.html) # Extract version number using regex latest_version=$(echo "$content" | grep -oP 'flyway-commandline-\K\d+\.\d+\.\d+(?=-windows-x64.zip)' | head -n 1) From 456288cf5cd4477c4bbbf2c99403874b2b949502 Mon Sep 17 00:00:00 2001 From: Peter-Laws Date: Tue, 28 Jan 2025 10:05:31 +0000 Subject: [PATCH 3/3] path correction --- Scripts/Flyway_DownloadAndInstallCLI.ps1 | 6 +++--- Scripts/Flyway_DownloadAndInstallCLI_Unix.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/Flyway_DownloadAndInstallCLI.ps1 b/Scripts/Flyway_DownloadAndInstallCLI.ps1 index 8f483ec..445ba08 100644 --- a/Scripts/Flyway_DownloadAndInstallCLI.ps1 +++ b/Scripts/Flyway_DownloadAndInstallCLI.ps1 @@ -1,6 +1,6 @@ $ErrorActionPreference = "Stop" -# Flyway Version to Use (Check for latest version: https://documentation.red-gate.com/flyway/reference/usage/command-line.html) +# Flyway Version to Use (Check for latest version: https://documentation.red-gate.com/flyway/reference/usage/command-line) if ($null -ne ${env:FLYWAY_VERSION}) { # Environment Variables - Use these if set as a variable - Target Database Connection Details Write-Output "Using Environment Variables for Flyway CLI Version Number" @@ -35,13 +35,13 @@ if ($null -ne ${env:FLYWAY_PATH_LOCATION}) { } # Fetch the content of the web page -Write-Output "Analysing https://documentation.red-gate.com/flyway/reference/usage/command-line.html for Latest Version Number" +Write-Output "Analysing https://documentation.red-gate.com/flyway/reference/usage/command-line for Latest Version Number" # Check if $flywayVersion is 'latest' (case-insensitive) if ($flywayVersion -ieq "latest") { # Fetch the content of the web page try { # Define the URL to fetch and fetch page content - $url = "https://documentation.red-gate.com/flyway/reference/usage/command-line.html" + $url = "https://documentation.red-gate.com/flyway/reference/usage/command-line" $response = Invoke-WebRequest -Uri $url -UseBasicParsing $content = $response.Content diff --git a/Scripts/Flyway_DownloadAndInstallCLI_Unix.sh b/Scripts/Flyway_DownloadAndInstallCLI_Unix.sh index 9713359..c98c4f0 100644 --- a/Scripts/Flyway_DownloadAndInstallCLI_Unix.sh +++ b/Scripts/Flyway_DownloadAndInstallCLI_Unix.sh @@ -22,7 +22,7 @@ get_installed_version() { # Function to get the latest version from the website get_latest_version_from_website() { # Fetch the webpage content - content=$(curl -s https://documentation.red-gate.com/flyway/reference/usage/command-line.html) + content=$(curl -s https://documentation.red-gate.com/flyway/reference/usage/command-line) # Extract version number using regex latest_version=$(echo "$content" | grep -oP 'flyway-commandline-\K\d+\.\d+\.\d+(?=-windows-x64.zip)' | head -n 1)