Skip to content

Conversation

@willcl-ark
Copy link
Contributor

Build an image from any repo + <commit_hash>.

I think this is more flexible and more useful.

It's also a step towards #389 and #181

Copy link
Contributor

@pinheadmz pinheadmz left a comment

Choose a reason for hiding this comment

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

ACK

reviewed and tested. image is building locally right now but it checked out the right HEAD so I think we're good here

Comment on lines +36 to +39
&& git clone --depth 1 "https://github.com/${REPO}" \
&& cd bitcoin \
&& git fetch --depth 1 origin "$COMMIT_SHA" \
&& git checkout "$COMMIT_SHA" \
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL you can do this: fetch a commit from another branch even though you cloned depth 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fetch is from the remote, so really the clone is just needed to setup git with the remote, then you can fetch any commit_sha (at depth 1) after that.

It's prob even possible to do in a one-liner, but I don't got time for that

@m3dwards m3dwards merged commit 2377b7e into bitcoin-dev-project:main Jul 24, 2024
@m3dwards m3dwards deleted the build-by-commit branch July 24, 2024 11:57
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.

3 participants