refactor: check for new version in upstream build only#1303
Merged
craicoverflow merged 3 commits intoredhat-developer:mainfrom Nov 9, 2021
Merged
refactor: check for new version in upstream build only#1303craicoverflow merged 3 commits intoredhat-developer:mainfrom
craicoverflow merged 3 commits intoredhat-developer:mainfrom
Conversation
ee63265 to
0add1e1
Compare
0add1e1 to
fc2d599
Compare
Collaborator
|
That change gives nice context for what #1290 was needed. |
Collaborator
|
Build it by default as dev. Build it as github and with some other random flag. It seems to work |
wtrocki
reviewed
Nov 9, 2021
internal/build/build.go
Outdated
| if BuildSource != string(githubBuildSource) { | ||
| return | ||
| } | ||
| fmt.Println("Checking for a new version") |
Contributor
Author
There was a problem hiding this comment.
I had that in for testing, needs to go.
craicoverflow
commented
Nov 9, 2021
Comment on lines
+84
to
+87
| // prefix version with a v to correspond with Git tag | ||
| if !strings.HasPrefix(version, "v") { | ||
| version = "v" + version | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Turns out version checks had not been working because of differences in Git tag and version.
Collaborator
There was a problem hiding this comment.
Any way I can verify this locally?
It looks like good fix
Contributor
Author
There was a problem hiding this comment.
BUILD_SOURCE=github RHOAS_VERSION=0.30.0 make binary
rhoas version
wtrocki
approved these changes
Nov 9, 2021
Collaborator
|
All good! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a stop-gap solution to #1290 by ensuring that version checking and printiing will only occur for the upstream CLI, when the
BuildSourcebuild variable is "github".