Closed jpgrayson closed 1 year ago
Thank you for proposing new feature.
In your PR, source
in package.metadata.generate-rpm.assets
is supposed to be written in with the value of target specified as an argument instead of release
, like target/my-profile/my-exe
. I think the source
in package.metadata.generate-rpm.assets
should be written as target/release/my-exe
and it should be expanded to target/my-profile/my-exe
or target/x 86_64-unknown-linux-musl/my-profile/my-exe
.
That is, I would prefer that profile be treated the same as target.
What do you think?
Could you please update the README.md in addition to the source code? A short addition to the "Cross compilation" clause would be sufficient.
Yes, good suggestion.
I've updated the patch so that the "target/release/" prefix is preferentially remapped while still also looking for "target/{prefix}". This is how cargo-deb does it.
And I've added a paragraph about the '--profile` option to README.md.
Thanks for reviewing this PR. Much appreciated.
When expanding an asset path, currently only the "target/release/" prefix could be remapped. By comprehending the build profile, path expansion can happen for "target/". This enables use of both alternative target-triple and build profiles.
For example, given the following asset configuration in Cargo.toml:
rpms can be generated for multiple target triples, such as:
with the paths for the "my-exe" executable expanded correctly to:
This behavior is consistent with cargo-deb, which also has a --profile option for the same purpose.