-
Notifications
You must be signed in to change notification settings - Fork 397
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
Implement pre-build copy #861
Comments
I'm not sure this is needed: I remember being initially very favorable of the idea of supporting other commands in the pre-build hooks or customizing the base image, but in retrospect it seems like the solution we implemented was much better. Currently, we have: [target.x86_64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture arm64",
"apt-get update && apt-get install --assume-yes libssl-dev:arm64"
] And my initial proposal would have been: [target.x86_64-unknown-linux-gnu]
pre-build = [
"RUN dpkg --add-architecture arm64",
"RUN apt-get update && apt-get install --assume-yes libssl-dev:arm64"
] Which honestly in retrospect is not very legible, and a Dockerfile is better in that case. If we use a The current solution for a Dockerfile is just much nicer for this: FROM ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main
RUN dpkg --add-architecture arm64
RUN apt-get update && apt-get install --assume-yes libssl-dev:arm64
COPY myscript.sh /
RUN /myscript.sh |
We only have one I think it'd be fine to include a way to call a script specifically, maybe that usecase is what should be supported and not a general "copy" |
I like that better, and make it clear it would happen after the pre-build run commands, which I believe is best. |
maybe simply [*]
pre-build = "./myscript.sh" # Note: not an array. don't think we need to support pre-build via array and this new alternative |
That makes it super simple, and correct. I think that's the correct approach. We should probably do:
|
910: add way to run script with pre-build r=Alexhuszagh a=Emilgardis Solves #861 Co-authored-by: Emil Gardström <[email protected]>
This was implemented in #910. |
Checklist
Describe your request
From reddit
Make it easy to integrate scripts to the pre-build hook.
Describe why this would be a good inclusion for
cross
No response
The text was updated successfully, but these errors were encountered: