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

[Feature-Request] Advanced Usage, "append" option for assets #114

Closed
juliusl opened this issue Oct 3, 2023 · 3 comments
Closed

[Feature-Request] Advanced Usage, "append" option for assets #114

juliusl opened this issue Oct 3, 2023 · 3 comments

Comments

@juliusl
Copy link
Contributor

juliusl commented Oct 3, 2023

It would be useful if there was an option to append the assets array for variants. For example, if I had a Cargo.toml like this,

[package]
name = "test-deb"
authors = ["foo"]
version = "0.1.0"
edition = "2021"
description = "example deb"
license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

[package.metadata.deb]
name = "test-deb"
assets = [
    [
    "lib/hello-world.txt",
    "hello-world.txt",
    "755"
    ]
]

[package.metadata.deb.variants.test]
assets=[
    [
    "lib/hello-world-2.txt",
    "hello-world-2.txt",
    "755"
    ]
]

Variant "test" would end up w/ both hello-world-2.txt, and hello-world.txt.

"Merging" would be cool too but, I think appending would probably be easier to implement.

I am willing to contribute a PR.

I'm thinking it would be an option like this,

[package.metadata.deb.variants.test]
append_assets=[
...
]
@kornelski
Copy link
Owner

Yes that makes sense. Perhaps it should be a merge, so that you can also replace destination paths of existing assets?

@juliusl
Copy link
Contributor Author

juliusl commented Oct 5, 2023

@kornelski merge would be even better, would you be open to a PR for this?

@kornelski
Copy link
Owner

Yes please.

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

No branches or pull requests

2 participants