Skip to content
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ jobs:
- run:
name: Run GoReleaser. Without actually publishing.
command: |
export LDFLAGS="-s -w -X 'github.com/slackapi/slack-cli/internal/pkg/version.Version=$BUILD_VERSION'"
make build-snapshot
LDFLAGS="-s -w -X 'github.com/slackapi/slack-cli/internal/pkg/version.Version=$BUILD_VERSION'"
make LDFLAGS="$LDFLAGS" build-snapshot
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The -s and -w flag weren't being used when building the snapshot! I'm hoping this improves our runtime speeds around 👾

Before:

$ du dist/*
...
13324   dist/slack_cli_3.0.2-main-build-test-feature-6-gcc496f3_linux_64-bit.tar.gz
13332   dist/slack_cli_3.0.2-main-build-test-feature-6-gcc496f3_macOS_64-bit.tar.gz
14376   dist/slack_cli_3.0.2-main-build-test-feature-6-gcc496f3_windows_64-bit.zip

After:

$ du dist/*
...
7156    dist/slack_cli_3.0.2-main-build-test-feature-6-gcc496f3_linux_64-bit.tar.gz
7252    dist/slack_cli_3.0.2-main-build-test-feature-6-gcc496f3_macOS_64-bit.tar.gz
7208    dist/slack_cli_3.0.2-main-build-test-feature-6-gcc496f3_windows_64-bit.zip

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch @zimeg! 👏🏻 Before this change, the export LDFLAGS was unused and instead it was using the LDFLAGS set by Makefile's startup.

- run:
name: Show binaries are generated correctly
command: ls -R ./dist
Expand Down
Loading