Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch build process to goreleaser #180

Merged
merged 1 commit into from
Feb 18, 2021
Merged

Conversation

dduportal
Copy link
Contributor

@dduportal dduportal commented Feb 18, 2021

This PR aims at switching the build process from tedious shell scripting to GoReleaser.
It is a foundational work for the futures PR about #154.

The scope of the PR is to provide a replacement "as it", without enabling all the powerful feature of goreleaser yet, which means:

  • Only build the binaries with the same name as before
  • No release, no binary checksum, no changelog, no homebrew support managed by goreleaser

Please note that command make build is now building all of the binaries:

  • The rationale is to use build matrix instead of 1 build per couple GOOS + GOARCH as in https://github.com/garethjevans/inspect/blob/main/.goreleaser.yml#L9 (ldflags are not duplicated, etc.).
  • The overhead is ~ 0.4s on my machine (MBP Core i7 2,6 Ghz, 16 Go, NVMe): Running 15 times the build has a median build time of 4.2s (max 4.8, min 3.9) while it was 3.8s before goreleaser (max 4.4 min 3.6).
  • The difference with make build.all for now is that make build is aimed at development, so it uses the --snapshot flag for goreleaser.

@dduportal dduportal force-pushed the feat/goreleaser branch 2 times, most recently from 0323523 to f1fe37a Compare February 18, 2021 13:29
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
@dduportal dduportal changed the title WIP: Switch build process to goreleaser Switch build process to goreleaser Feb 18, 2021
@dduportal dduportal marked this pull request as ready for review February 18, 2021 15:38
Copy link
Member

@olblak olblak left a comment

Choose a reason for hiding this comment

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

Thanks for this PR, I can't wait to use more goreleaser

@olblak olblak merged commit 2a332c7 into updatecli:main Feb 18, 2021
@olblak olblak added the enhancement New feature or request label Feb 18, 2021
@dduportal dduportal deleted the feat/goreleaser branch February 18, 2021 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants