-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
tools, github: Add current SOURCE_VERSION writer #23577
Conversation
This adds a script to produce SOURCE_VERSION which is useful to build envoy in a non-git (from an extracted release tarball) directory. Signed-off-by: Dhi Aurrahman <[email protected]>
Signed-off-by: Dhi Aurrahman <[email protected]>
Signed-off-by: Dhi Aurrahman <[email protected]>
Signed-off-by: Dhi Aurrahman <[email protected]>
Signed-off-by: Dhi Aurrahman <[email protected]>
Signed-off-by: Dhi Aurrahman <[email protected]>
/assign @phlax |
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.
looks good @dio
im wondering if we should wrap the code in a main
function and use a if __name__ == "__main__":
block to trigger it - it just means it wont run just from being imported
im also wondering if we need to add some info somewhere to say to run this before running any bazel tasks (for a tarball build)
Signed-off-by: Dhi Aurrahman <[email protected]>
Thanks for the review @phlax. I added some lines in |
Signed-off-by: Dhi Aurrahman <[email protected]>
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.
one python suggestion and then i think this should be good to land
Signed-off-by: Dhi Aurrahman <[email protected]>
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, thanks @dio
Commit Message: This adds a script to produce the
SOURCE_VERSION
file which is useful to build envoy in a non-git (from an extracted release tarball) directory. See:bazel/get_workspace_status
for more information.Relevant: #2181.
Additional Description: This is useful to have a way to produce
SOURCE_VERSION
, for example, to solve: https://github.com/Homebrew/homebrew-core/blob/923bb7a622b86876a662d1ed4a7ac51ccb2befcf/Formula/envoy.rb#L4. So downstream builder can consume release tarballs to build envoy without adding custom scripts to createSOURCE_VERSION
.Risk Level: Low, since this is an optional tool.
Testing: Run the script in git and non-git environments.
Docs Changes: Added.
Release Notes: N/A
Platform-Specific Features: N/A