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

version: rewrite command to use GitHub endpoints #1261

Merged
merged 2 commits into from
Aug 23, 2023
Merged

Conversation

hiddeco
Copy link
Member

@hiddeco hiddeco commented Aug 16, 2023

Based on difficulties observed in #1238 (comment)

This changes the logic of parsing the version.go file from a certain
branch to instead make use of the GitHub latest release redirect or
API1 endpoints for checking if sops is on the latest version.

Detaching any future release of SOPS from specific file structures
and/or branches, and (theoretically) freeing it from the requirement of
having to bump the version in-code during release (as this is also done
using -ldflags during build). Were it not for the fact that we have
to maintain it for backwards compatibility.

@hiddeco hiddeco added this to the v3.8.0 milestone Aug 16, 2023
version/version.go Outdated Show resolved Hide resolved
@hiddeco hiddeco changed the title version: rewrite command to use GitHub API version: rewrite command to use GitHub endpoints Aug 17, 2023
@hiddeco hiddeco force-pushed the version-cmd-gh-api branch 6 times, most recently from c8a21b7 to 75d3ce6 Compare August 22, 2023 19:15
Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Besides that, LGTM!

version/version.go Outdated Show resolved Hide resolved
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This changes the logic of parsing the `version.go` file from a certain
branch to instead make use of the GitHub latest release redirect or
API[1] endpoints for checking if `sops` is on the latest version.

Detaching any future release of SOPS from specific file structures
and/or branches, and (theoretically) freeing it from the requirement of
having to bump the version in-code during release (as this is also done
using `-ldflags` during build). Were it not for the fact that we have
to maintain it for backwards compatibility.

[1]: https://docs.github.com/en/free-pro-team@latest/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release

Signed-off-by: Hidde Beydals <hidde@hhh.computer>
@hiddeco hiddeco merged commit 0db842d into main Aug 23, 2023
7 checks passed
@hiddeco hiddeco deleted the version-cmd-gh-api branch August 23, 2023 11:36
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.

None yet

2 participants