-
Notifications
You must be signed in to change notification settings - Fork 6.8k
build: add version stamp to release output #12418
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
Conversation
export function insertPackageJsonVersionStamp(packageJsonPath: string) { | ||
const packageJson = require(packageJsonPath); | ||
|
||
packageJson['_gitCommitStamp'] = getCurrentCommitSha(); |
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.
Any reason to prefix with an underscore?
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 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 would prefer to remove it if npm
uses it for their own internal properties
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.
Sure. I assume the naming itself is fine then? e.g. gitCommitStamp
.
const packageJson = require(packageJsonPath); | ||
|
||
packageJson['_gitCommitStamp'] = getCurrentCommitSha(); | ||
packageJson['_gitBranchStamp'] = getCurrentBranchName(); |
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 thought it might also be useful to stamp the current git username, but I want to check with Igor/Brad about doing that. I'll let you know.
Chatted with the others; no objections to adding user name. However, Igor also pointed out that we should have tooling that asserts that, upon doing a release, that you're correctly tagged the release first. |
I would do |
* Adds a version stamp to the `package.json` in the release output. The version stamp consists of the current `HEAD` commit sha, and the branch name. Closes angular#12407
e3e669f
to
f2a2c6d
Compare
f2a2c6d
to
d96c57a
Compare
@jelbourn Addressed your feedback. We could probably have a |
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.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
package.json
in the release output. The version stamp consists of the currentHEAD
commit sha, and the branch name.Closes #12407