Skip to content

Commit 8973fda

Browse files
authored
feat: redirect tools version metadata in reference to docs site (#269)
1 parent d1b2eed commit 8973fda

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

internal/update/cli.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/spf13/cobra"
2525
)
2626

27-
const metadataURL = "https://api.slack.com/slackcli/metadata.json"
27+
const metadataURL = "https://docs.slack.dev/tools/metadata.json"
2828

2929
// CLIDependency contains information about the
3030
// current version and the latest CLI release version

internal/update/cli_metadata_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (m *HTTPClientMock) Do(req *http.Request) (*http.Response, error) {
3939

4040
// Test_CLI_Metadata_CheckForUpdate tests different responses from Slack CLI metadata.
4141
func Test_CLI_Metadata_CheckForUpdate(t *testing.T) {
42-
const metadataURL = "https://api.slack.com/slackcli/metadata.json"
42+
const metadataURL = "https://docs.slack.dev/tools/metadata.json"
4343

4444
scenarios := map[string]struct {
4545
CurrentVersion string

scripts/install-windows-dev.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function install_slack_cli {
108108
}
109109
else {
110110
Write-Host "Finding the latest Slack CLI release version"
111-
$cli_info = Invoke-RestMethod -Uri "https://api.slack.com/slackcli/metadata.json"
111+
$cli_info = Invoke-RestMethod -Uri "https://docs.slack.dev/tools/metadata.json"
112112
$SLACK_CLI_VERSION = $cli_info.'slack-cli'.releases.version[0]
113113
}
114114
}

scripts/install-windows.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function install_slack_cli {
105105
}
106106
else {
107107
Write-Host "Finding the latest Slack CLI release version"
108-
$cli_info = Invoke-RestMethod -Uri "https://api.slack.com/slackcli/metadata.json"
108+
$cli_info = Invoke-RestMethod -Uri "https://docs.slack.dev/tools/metadata.json"
109109
$SLACK_CLI_VERSION = $cli_info.'slack-cli'.releases.version[0]
110110
}
111111
}

scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ install_slack_cli() {
115115
# Using grep and sed to parse the semver (excluding "v" to ensure consistence of binaries' filenames ) instead of jq to avoid extra dependencies requirement
116116
#
117117
echo -e "🔍 Searching for the latest version of the Slack CLI..."
118-
LATEST_SLACK_CLI_VERSION=$(curl --silent "https://api.slack.com/slackcli/metadata.json" | grep -o '"version": "[^"]*' | grep -o '[^"]*$' | head -1)
118+
LATEST_SLACK_CLI_VERSION=$(curl --silent "https://docs.slack.dev/tools/metadata.json" | grep -o '"version": "[^"]*' | grep -o '[^"]*$' | head -1)
119119
if [ -z "$LATEST_SLACK_CLI_VERSION" ]; then
120120
echo "🛑 Error: Installer cannot find the latest Slack CLI version!"
121121
echo "🔖 Check the status of https://slack-status.com/ and try again"

0 commit comments

Comments
 (0)