terramate-io / terramate

Terramate CLI is an open-source Infrastructure as Code (IaC) Orchestration and Code Generation tool for Terraform, OpenTofu and Terragrunt.
https://terramate.io
Mozilla Public License 2.0
3.12k stars 86 forks source link

chore: Check goreleaser version and update Go Releaser to v1.14.0-pro #1699

Closed RocketRene closed 1 month ago

RocketRene commented 1 month ago

This commit updates the Go Releaser version in the common makefile to v1.14.0-pro. It also adds a new target, check-goreleaser-version, which checks the installed version of Go Releaser against the specified version. If the installed version does not match, an error is thrown. This ensures that the correct version of Go Releaser is being used for the release process and local tests with make release/dry-run.

RocketRene commented 1 month ago

@i4ki what do you think about this way to version check?

i4ki commented 1 month ago
✗ goreleaser --version
goreleaser version 1.14.0-pro
commit: 3f5bce1866cba9f831846cb72aed3226528330af
built at: 2022-12-27T22:30:00Z
built by: goreleaser
goos: darwin
goarch: arm64

https://goreleaser.com/pro

There's no GitVersion in the output (at least from my binary)

RocketRene commented 1 month ago

oh no... this is my output ....

❯ goreleaser --version
  ____       ____      _                            ____
 / ___| ___ |  _ \ ___| | ___  __ _ ___  ___ _ __  |  _ \ _ __ ___
| |  _ / _ \| |_) / _ \ |/ _ \/ _` / __|/ _ \ '__| | |_) | '__/ _ \
| |_| | (_) |  _ <  __/ |  __/ (_| \__ \  __/ |    |  __/| | | (_) |
 \____|\___/|_| \_\___|_|\___|\__,_|___/\___|_|    |_|   |_|  \___/
goreleaser-pro: Deliver Go Binaries as fast and easily as possible
https://goreleaser.com/pro

GitVersion:    1.25.1-pro
GitCommit:     a9e11f291536cbf4e91021fea047036d08482807
GitTreeState:  clean
BuildDate:     2024-04-03T17:23:21Z
BuiltBy:       goreleaser
GoVersion:     go1.22.1
Compiler:      gc
ModuleSum:     unknown
Platform:      linux/amd64
RocketRene commented 1 month ago

should I try to grab the version using regex ?

i4ki commented 1 month ago

@RocketRene closing this one now. Feel free to reopen if implementing another strategy.