diff --git a/internal/update/cli.go b/internal/update/cli.go index 86d92e57..7635594d 100644 --- a/internal/update/cli.go +++ b/internal/update/cli.go @@ -24,7 +24,7 @@ import ( "github.com/spf13/cobra" ) -const metadataURL = "https://api.slack.com/slackcli/metadata.json" +const metadataURL = "https://docs.slack.dev/tools/metadata.json" // CLIDependency contains information about the // current version and the latest CLI release version diff --git a/internal/update/cli_metadata_test.go b/internal/update/cli_metadata_test.go index 1ed10a71..2e38b08e 100644 --- a/internal/update/cli_metadata_test.go +++ b/internal/update/cli_metadata_test.go @@ -39,7 +39,7 @@ func (m *HTTPClientMock) Do(req *http.Request) (*http.Response, error) { // Test_CLI_Metadata_CheckForUpdate tests different responses from Slack CLI metadata. func Test_CLI_Metadata_CheckForUpdate(t *testing.T) { - const metadataURL = "https://api.slack.com/slackcli/metadata.json" + const metadataURL = "https://docs.slack.dev/tools/metadata.json" scenarios := map[string]struct { CurrentVersion string diff --git a/scripts/install-windows-dev.ps1 b/scripts/install-windows-dev.ps1 index 49690691..b5339369 100644 --- a/scripts/install-windows-dev.ps1 +++ b/scripts/install-windows-dev.ps1 @@ -108,7 +108,7 @@ function install_slack_cli { } else { Write-Host "Finding the latest Slack CLI release version" - $cli_info = Invoke-RestMethod -Uri "https://api.slack.com/slackcli/metadata.json" + $cli_info = Invoke-RestMethod -Uri "https://docs.slack.dev/tools/metadata.json" $SLACK_CLI_VERSION = $cli_info.'slack-cli'.releases.version[0] } } diff --git a/scripts/install-windows.ps1 b/scripts/install-windows.ps1 index 785014e6..d89525fd 100644 --- a/scripts/install-windows.ps1 +++ b/scripts/install-windows.ps1 @@ -105,7 +105,7 @@ function install_slack_cli { } else { Write-Host "Finding the latest Slack CLI release version" - $cli_info = Invoke-RestMethod -Uri "https://api.slack.com/slackcli/metadata.json" + $cli_info = Invoke-RestMethod -Uri "https://docs.slack.dev/tools/metadata.json" $SLACK_CLI_VERSION = $cli_info.'slack-cli'.releases.version[0] } } diff --git a/scripts/install.sh b/scripts/install.sh index 2e01d521..e2315c2a 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -115,7 +115,7 @@ install_slack_cli() { # Using grep and sed to parse the semver (excluding "v" to ensure consistence of binaries' filenames ) instead of jq to avoid extra dependencies requirement # echo -e "🔍 Searching for the latest version of the Slack CLI..." - LATEST_SLACK_CLI_VERSION=$(curl --silent "https://api.slack.com/slackcli/metadata.json" | grep -o '"version": "[^"]*' | grep -o '[^"]*$' | head -1) + LATEST_SLACK_CLI_VERSION=$(curl --silent "https://docs.slack.dev/tools/metadata.json" | grep -o '"version": "[^"]*' | grep -o '[^"]*$' | head -1) if [ -z "$LATEST_SLACK_CLI_VERSION" ]; then echo "🛑 Error: Installer cannot find the latest Slack CLI version!" echo "🔖 Check the status of https://slack-status.com/ and try again"