fix: replace git hash with build number in UI footer#5153
Open
Ma77Ball wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5153 +/- ##
============================================
- Coverage 43.36% 43.34% -0.02%
+ Complexity 2217 2212 -5
============================================
Files 1049 1049
Lines 40560 40560
Branches 4322 4322
============================================
- Hits 17589 17582 -7
- Misses 21883 21886 +3
- Partials 1088 1092 +4
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
/request-review @bobbai00 |
Contributor
|
For UI related PRs, please include UI screenshot as the change. Thanks |
Comment on lines
21
to
+25
| const { version } = require("./package.json"); | ||
| const { resolve, relative } = require("path"); | ||
| const { writeFileSync, existsSync, mkdirSync } = require("fs-extra"); | ||
|
|
||
| const gitInfo = gitDescribeSync({ | ||
| dirtyMark: false, | ||
| dirtySemver: false, | ||
| }); | ||
|
|
||
| gitInfo.version = version; | ||
| const buildNumber = generate(version); |
Contributor
There was a problem hiding this comment.
can we simply call this method in source code, instead of doing so in post install script? I think we can get rid of such a post install script.
Yicong-Huang
requested changes
May 22, 2026
Signed-off-by: Matthew B. <mgball@uci.edu>
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.
What changes were proposed in this PR?
frontend/git-version.jswithfrontend/build-version.js, which usesbuild-number-generatorto stamp a version + timestamp build number instead of shelling out togit describe.git-describedevDependency forbuild-number-generator, and pointed thepostinstallscript at the new file.src/environments/version.tsschema to{ buildNumber, version }, since the oldgit-describeoutput fields had a single consumer.DashboardComponent.gitCommitHashtobuildNumber, updated the footer label toBuild:, and renamed the#git-commit-idCSS id to#build-number.Any related issues, documentation, or discussions?
closes: #3613
How was this PR tested?
node build-version.jsdirectly and confirmed it wrote a validversion.tswith the newbuildNumberfield.Was this PR authored or co-authored using generative AI tooling?
Co-authored with Claude Opus 4.7 in compliance with ASF