-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Fix --version
output
#1352
Merged
timvaillancourt
merged 2 commits into
github:master
from
timvaillancourt:fix-version-output
Dec 11, 2023
Merged
Fix --version
output
#1352
timvaillancourt
merged 2 commits into
github:master
from
timvaillancourt:fix-version-output
Dec 11, 2023
Conversation
This file contains 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
Signed-off-by: Tim Vaillancourt <[email protected]>
Signed-off-by: Tim Vaillancourt <[email protected]>
timvaillancourt
commented
Dec 11, 2023
@@ -160,12 +160,15 @@ func main() { | |||
flag.PrintDefaults() | |||
return | |||
} | |||
|
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.
Let's always fallback to unversioned
/unknown
so that the starting gh-ost %+v
logline later also gets this fallback instead of ""
meiji163
approved these changes
Dec 11, 2023
RainbowDashy
pushed a commit
to bytebase/gh-ost
that referenced
this pull request
Jan 2, 2024
* Fix `--version` output Signed-off-by: Tim Vaillancourt <[email protected]> * Always fallback version/commit if undef Signed-off-by: Tim Vaillancourt <[email protected]> --------- Signed-off-by: Tim Vaillancourt <[email protected]>
d-bytebase
pushed a commit
to bytebase/gh-ost
that referenced
this pull request
Jan 2, 2024
* Add `focal` build * upgrade codeQL action to v2 * Pin docker image to stretch (github#1324) * pin stretch image * update stretch repo * Update Dockerfile.test * parse binlog timestamp in UTC (github#1322) * upgrade standard library deps (github#1332) * fix: typo (github#1331) Co-authored-by: Tim Vaillancourt <[email protected]> * Remove stale RELEASE_VERSION file (github#1349) Signed-off-by: Tim Vaillancourt <[email protected]> * Force index in unique key range queries (github#1237) * WIP * Pass entire sql.UniqueKey * newline for limit * Rename var --------- Co-authored-by: meiji163 <[email protected]> * Include git commit in version (github#1347) * Include git commit in version Signed-off-by: Tim Vaillancourt <[email protected]> * Make --version output change less-breaking --------- Signed-off-by: Tim Vaillancourt <[email protected]> * Fix tokens in inspector logging (github#1226) * Cleanup whitespace and comments in SQL query text (github#1246) * Cleanup whitespace in SQL query text * cleanup * Add indent * Update unit tests * Update unit tests, pt 2 * Fix tweaks * Fix merge conflict resolution Signed-off-by: Tim Vaillancourt <[email protected]> --------- Signed-off-by: Tim Vaillancourt <[email protected]> * Fix `--version` output (github#1352) * Fix `--version` output Signed-off-by: Tim Vaillancourt <[email protected]> * Always fallback version/commit if undef Signed-off-by: Tim Vaillancourt <[email protected]> --------- Signed-off-by: Tim Vaillancourt <[email protected]> * Update to `go1.21` (github#1351) * go1.21 + bullseye Signed-off-by: Tim Vaillancourt <[email protected]> * go1.21 + bullseye pt 2 Signed-off-by: Tim Vaillancourt <[email protected]> * checkout before setup-go Signed-off-by: Tim Vaillancourt <[email protected]> * go fmt Signed-off-by: Tim Vaillancourt <[email protected]> * Use golangci-lint 1.54.2 to support go1.21 Signed-off-by: Tim Vaillancourt <[email protected]> * stop using io/ioutil to make linter happy Signed-off-by: Tim Vaillancourt <[email protected]> * Fix typo Signed-off-by: Tim Vaillancourt <[email protected]> * Lint Signed-off-by: Tim Vaillancourt <[email protected]> * revert replica-tests CI to ubuntu 20 due to linker errors Signed-off-by: Tim Vaillancourt <[email protected]> * Update ensure-go-installed * use `ubuntu-latest` for `ci` job Signed-off-by: Tim Vaillancourt <[email protected]> * stretch -> bullseye Signed-off-by: Tim Vaillancourt <[email protected]> --------- Signed-off-by: Tim Vaillancourt <[email protected]> Signed-off-by: Tim Vaillancourt <[email protected]> * Replace deprecated `github.com/satori/go.uuid` lib (github#1354) Signed-off-by: Tim Vaillancourt <[email protected]> * Add `CODEOWNERS` file to auto-request reviews (github#1350) Signed-off-by: Tim Vaillancourt <[email protected]> * go mod tidy * update test * fix lint --------- Signed-off-by: Tim Vaillancourt <[email protected]> Signed-off-by: Tim Vaillancourt <[email protected]> Co-authored-by: Rashiq <[email protected]> Co-authored-by: meiji163 <[email protected]> Co-authored-by: guangwu <[email protected]> Co-authored-by: Tim Vaillancourt <[email protected]>
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.
Description
This PR fixes a problem introduced in #1347 due to my forgetting to add newline character to
fmt.Printf(...)
🤦Secondly, I've made an empty
GitCommit
display a bit more clearerBefore (notice no
\n
char)After: undefined
AppVersion
+GitCommit
After
tvaillancourt@tvailla-ltmxctu gh-ost % go build -o gh-ost -ldflags "-X main.AppVersion=1.1.6 -X main.GitCommit=$(git rev-parse HEAD)" ./go/cmd/gh-ost/main.go tvaillancourt@tvailla-ltmxctu gh-ost % ./gh-ost --version 1.1.6 (git commit: 5ebb95347e2002a5a959483f3e801cd3267e7e88) tvaillancourt@tvailla-ltmxctu gh-ost %
script/cibuild
returns with no formatting errors, build errors or unit test errors.