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

chore: Set default version from VERSION file #88

Merged
merged 5 commits into from
Mar 29, 2024

Conversation

nieomylnieja
Copy link
Contributor

@nieomylnieja nieomylnieja commented Mar 28, 2024

Motivation

If sloctl is installed through go install command it won't have the version set through build tags as we don't have any control over it. While it is possible to automate the process of updating the version we should currently just go with a manual, pre-release step to update VERSION file to the version we want to release.

Testing

Run make build, assert the output of bin/sloctl version is sloctl/v0.0.99-- (linux amd64 go1.22.1).

Run LDFLAGS="-X $(go list -m)/internal.BuildVersion=v0.1.0" make build, assert the output of bin/sloctl version is sloctl/v0.1.0-- (linux amd64 go1.22.1).

@nieomylnieja nieomylnieja merged commit 7123d7f into main Mar 29, 2024
5 checks passed
@nieomylnieja nieomylnieja deleted the chore-set-default-version-from-file branch March 29, 2024 11:40
BSski pushed a commit that referenced this pull request May 7, 2024
## Motivation

If `sloctl` is installed through `go install` command it won't have the
version set through build tags as we don't have any control over it.
While it is possible to automate the process of updating the version we
should currently just go with a manual, pre-release step to update
VERSION file to the version we want to release.

## Testing

Run `make build`, assert the output of `bin/sloctl version` is
`sloctl/v0.0.99-- (linux amd64 go1.22.1)`.

Run `LDFLAGS="-X $(go list -m)/internal.BuildVersion=v0.1.0" make
build`, assert the output of `bin/sloctl version` is `sloctl/v0.1.0--
(linux amd64 go1.22.1)`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants