-
Notifications
You must be signed in to change notification settings - Fork 55
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
warn user if either the client or server is out of date #401
Conversation
.github/workflows/release.yml
Outdated
- run: make release | ||
env: | ||
- run: | | ||
echo $GITHUB_REF | cut -d/ -f3- | tee version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't find a way to generate this in goreleaser so doing in bash instead. $GITHUB_REF
is "The branch or tag ref that triggered the workflow." It has the format refs/tags/...
so need to strip off the first two parts.
@@ -64,6 +64,17 @@ blobs: | |||
ids: | |||
- zip | |||
- packages | |||
extra_files: | |||
- glob: version | |||
- provider: s3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no way to create a link to point to latest
so uploading another set explicitly called latest
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good! Will this correctly overwrite the entire folder on deploy? (i.e. making sure there won't be any dangling files in the next deploy?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good question. It's probably not smart enough to clear out the directory so the existing files will probably stick around. Having a latest
release might not be necessary. Instead, should be able to publish a version
file in the top level directory, e.g. infra
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this PR to publish the version in a latest
file that will be published to releases.infrahq.com/infra/latest
since we don't need a latest release link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the file manually for now but this should publish it on the next version bump
.goreleaser.yml
Outdated
@@ -64,6 +64,17 @@ blobs: | |||
ids: | |||
- zip | |||
- packages | |||
extra_files: | |||
- glob: version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publish the generated version
alongside the archives and packages
return err | ||
} | ||
|
||
fmt.Fprintln(w, "Registry:\t", res.Version) | ||
fmt.Fprintln(w) | ||
if res.StatusCode >= 400 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could check for 200 but this covers much more cases
Can add things like upgrade hints or only showing the update message once per new version but that can wait until next iteration. |
Implements #355