Skip to content
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

Generate sha256 message digest for built binaries #418

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ddlees
Copy link

@ddlees ddlees commented Jan 23, 2023

Relates to #306

This work generates files that contain the sha256 message digest for each binary. I'm not sure how you go about populating artifacts to the github release but would be able to do it if someone could point me in the right direction.

ctx.actions.run_shell(
outputs = [ctx.outputs.sha256],
inputs = [ctx.file.src],
command = "CWD=$PWD && cd `dirname {0}` && sha256sum `basename {0}` > $CWD/{1}".format(ctx.file.src.path, ctx.outputs.sha256.path),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We typically build releases on MacOS, which uses a different tool (shasum -a 256)

@fweikert
Copy link
Member

fweikert commented Feb 1, 2023

I think the best approach right now would be to produce a single text file containing the hashes for each artifact, since we manually upload all artifacts to GitHub. We should probably add a release pipeline to Bazel CI, and might explore something like SLSA in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants