Skip to content

Commit c57469d

Browse files
authored
Merge branch 'main' into zimeg-ci-release-autorc
2 parents 009d97e + aad8f88 commit c57469d

26 files changed

Lines changed: 389 additions & 35 deletions

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ workflows:
433433
<<: *filters-tag-triggered-workflow-job
434434
name: upload-to-s3-for-install-linux-feature-build
435435
s3-target-path: slack-cli
436-
file-name: "slack_cli_*feature_linux_64-bit.tar.gz"
436+
file-name: "slack_cli_*feature_linux_*.tar.gz"
437437
requires:
438438
- create-github-release-and-artifacts
439439
context: slack-cli-release

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Install Tests
2929
run: make test-install
3030
- name: Upload coverage to Codecov
31-
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6.0.0
31+
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
3232
with:
3333
token: ${{ secrets.CODECOV_TOKEN }}
3434
files: ./coverage.out

.goreleaser.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ builds:
3232
- windows
3333
goarch:
3434
- amd64
35+
- arm64
36+
ignore:
37+
- goos: windows
38+
goarch: arm64
3539

3640
- id: slack-macos
3741
binary: bin/slack
@@ -74,6 +78,8 @@ archives:
7478
{{- .Env.BUILD_VERSION }}_
7579
{{- if eq .Os "darwin" -}}
7680
macOS_{{ if eq .Arch "all" }}64-bit{{ else }}{{ .Arch }}{{ end }}
81+
{{- else if eq .Os "linux" -}}
82+
linux_{{ .Arch }}
7783
{{- else -}}
7884
{{ .Os }}_{{ if eq .Arch "amd64" }}64-bit{{ else }}{{ .Arch }}{{ end }}
7985
{{- end }}

cmd/root.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import (
5252
"github.com/slackapi/slack-cli/internal/slackerror"
5353
"github.com/slackapi/slack-cli/internal/style"
5454
"github.com/slackapi/slack-cli/internal/update"
55+
"github.com/slackapi/slack-cli/internal/useragent"
5556
"github.com/slackapi/slack-cli/internal/version"
5657
"github.com/spf13/cobra"
5758
"github.com/spf13/pflag"
@@ -286,6 +287,7 @@ func InitConfig(ctx context.Context, clients *shared.ClientFactory, rootCmd *cob
286287
rootCmd.SetContext(ctx)
287288
// Debug logging
288289
clients.IO.PrintDebug(ctx, "system_id: %s", clients.Config.SystemID)
290+
clients.IO.PrintDebug(ctx, "user_agent: %s", useragent.BuildUserAgent(version.Raw()))
289291
}
290292

291293
// Init Project ID, if current directory is a project

cmd/upgrade/upgrade.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ func NewCommand(clients *shared.ClientFactory) *cobra.Command {
4040
"",
4141
"If there are any, then you will be prompted to upgrade",
4242
"",
43+
"In non-interactive environments (CI/CD, scripts, piped output),",
44+
"update checks still run but the auto-update prompt is skipped.",
45+
"To suppress update checks entirely on other commands, use",
46+
"--skip-update or set SLACK_SKIP_UPDATE.",
47+
"",
4348
fmt.Sprintf(`The changelog can be found at {{LinkText "%s"}}`, changelogURL),
4449
}, "\n"),
4550
Example: style.ExampleCommandsf([]style.ExampleCommand{

docs/guides/authorizing-the-slack-cli.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ Once a day, the Slack CLI checks for updates after running any command. When an
6363
6464
Update notifications can be disabled using a command-line flag or an environment variable. When running any command, you can append the `--skip-update` or `-s` flag. Alternatively, you can set the `SLACK_SKIP_UPDATE` environment variable and assign it any value.
6565
66+
When the CLI runs in a non-interactive environment, such as inside a CI/CD pipeline or when the output is piped, the update check runs without the auto-update confirmation prompt. The notification text may still appear in command output, however. You can suppress the check entirely with the `--skip-update` flag or `SLACK_SKIP_UPDATE` environment variable to keep the automation output clean.
67+
68+
:::info[The `--skip-update` flag and the `SLACK_SKIP_UPDATE` environment variable are intentionally ignored when running the `slack upgrade` command directly, since that command's purpose is to check for updates.
69+
:::
70+
6671
## CI/CD authorization {#ci-cd}
6772

6873
Setting up a CI/CD pipeline requires authorization using a service token. Service tokens are **long-lived, non-rotatable user tokens** &mdash; they won't expire, so they can be used to perform any Slack CLI action without the need to refresh tokens.

docs/guides/setting-up-ci-cd-with-the-slack-cli.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ You'll also need to accommodate requests from your network to a variety of hosts
5858

5959
In addition, you'll need to obtain a service token to authorize your CI/CD setup. Refer to [CI/CD authorization](/tools/slack-cli/guides/authorizing-the-slack-cli#ci-cd) for more details about obtaining, using, and revoking service tokens.
6060

61+
### Disabling update checks {#disable-updates}
62+
63+
In CI/CD pipelines, set a `SLACK_SKIP_UPDATE` environment variable to `1` (or pass `--skip-update` on each command) to prevent the CLI from checking for new versions on every run. See [Version update notifications](/tools/slack-cli/guides/authorizing-the-slack-cli#version-updates) for details.
64+
6165
Once you've done those things, you're ready to get started! Let's walk through an example.
6266

6367
Let's take a look at the [Virtual Running Buddies sample app](https://github.com/slack-samples/deno-virtual-running-buddies).

docs/reference/commands/slack_upgrade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Checks for available updates to the CLI or the SDKs of a project
88

99
If there are any, then you will be prompted to upgrade
1010

11+
In non-interactive environments (CI/CD, scripts, piped output),
12+
update checks still run but the auto-update prompt is skipped.
13+
To suppress update checks entirely on other commands, use
14+
--skip-update or set SLACK_SKIP_UPDATE.
15+
1116
The changelog can be found at [https://docs.slack.dev/changelog](https://docs.slack.dev/changelog)
1217

1318
```

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ require (
517517
require (
518518
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
519519
github.com/fatih/color v1.19.0 // indirect
520-
github.com/go-git/go-git/v5 v5.19.0
520+
github.com/go-git/go-git/v5 v5.19.1
521521
github.com/inconshreveable/mousetrap v1.1.0 // indirect
522522
github.com/kubescape/go-git-url v0.0.31
523523
github.com/mattn/go-colorable v0.1.14 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,8 @@ github.com/go-git/go-billy/v5 v5.9.0 h1:jItGXszUDRtR/AlferWPTMN4j38BQ88XnXKbilmm
508508
github.com/go-git/go-billy/v5 v5.9.0/go.mod h1:jCnQMLj9eUgGU7+ludSTYoZL/GGmii14RxKFj7ROgHw=
509509
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4=
510510
github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII=
511-
github.com/go-git/go-git/v5 v5.19.0 h1:+WkVUQZSy/F1Gb13udrMKjIM2PrzsNfDKFSfo5tkMtc=
512-
github.com/go-git/go-git/v5 v5.19.0/go.mod h1:Pb1v0c7/g8aGQJwx9Us09W85yGoyvSwuhEGMH7zjDKQ=
511+
github.com/go-git/go-git/v5 v5.19.1 h1:nX27AnaU43/K5bKktKwgBmR9lawoYVe1Ckg0rgzzN00=
512+
github.com/go-git/go-git/v5 v5.19.1/go.mod h1:Pb1v0c7/g8aGQJwx9Us09W85yGoyvSwuhEGMH7zjDKQ=
513513
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
514514
github.com/go-jose/go-jose/v4 v4.1.4 h1:moDMcTHmvE6Groj34emNPLs/qtYXRVcd6S7NHbHz3kA=
515515
github.com/go-jose/go-jose/v4 v4.1.4/go.mod h1:x4oUasVrzR7071A4TnHLGSPpNOm2a21K9Kf04k1rs08=

0 commit comments

Comments
 (0)