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

Add --profile command line option #73

Merged
merged 1 commit into from
May 21, 2023

Commits on May 20, 2023

  1. Add --profile command line option

    When expanding a source asset path, the "target/release/" prefix is now
    remapped using profile in addition to target and target-dir. This enables
    use of both alternative target-triple and build profiles.
    
    For example, given the following asset configuration in Cargo.toml:
    
        [package.metadata.generate-rpm]
        assets = [
          { source = "target/release/my-exe", dest = "/usr/bin/", mode = "755" },
        ]
    
    rpms can be generated for multiple target triples, such as:
    
        cargo generate-rpm --profile my-profile --target x86_64-unknown-linux-musl
        cargo generate-rpm --profile my-profile --target i668-unknown-linux-musl
    
    with the paths for the "my-exe" executable expanded correctly to:
    
        target/x86_64-unknown-linux-musl/my-profile/my-exe
        target/i686-unknown-linux-musl/my-profile/my-exe
    
    This behavior is consistent with cargo-deb, which also has a --profile
    option for the same purpose.
    
    Signed-off-by: Peter Grayson <pete@jpgrayson.net>
    jpgrayson committed May 20, 2023
    Configuration menu
    Copy the full SHA
    6eb9b28 View commit details
    Browse the repository at this point in the history