jaemk / self_update

Self updates for rust executables
MIT License
796 stars 69 forks source link

Add identifier for releases with multiple compatible assets #103

Closed oeb25 closed 1 year ago

oeb25 commented 1 year ago

This change is relevant when you have multiple binaries as part of a single release. In this case, the target is not enough to determine which asset to choose. Thus this change allows an identifier to be passed along from the builders, to select the correct one in such cases.

This adds argument identifier: Option<&str> to Release::asset_for, which allows the caller to specify a string that must be part of the asset name in addition to the target.

Additionally it adds a method to ReleaseUpdate which allows the identifier to be specified in the UpdateBuilder structs.

One possible change, could be to make the identifier a closure, or like the Pattern like the struct search functions in std, instead of relying on only substrings.

jaemk commented 1 year ago

Looks good

jaemk commented 1 year ago

released in 0.35.0

oeb25 commented 1 year ago

Thanks 🎉