mmstick / cargo-deb

A cargo subcommand that generates Debian packages from information in Cargo.toml
615 stars 50 forks source link

Replace - by ~ to keep version precedence #102

Closed fredszaq closed 5 years ago

fredszaq commented 5 years ago

This changes the default value of the version used for the deb package.

The current implementation uses the cargo version as a default, that is using semantic versionning.

This is not ideal, as the precedence of versions using semantic versionning is not the same as the one used in debian.

This means that when using prerelease metadata from semver (for example 1.2.3-beta.4) the precedence of versions will not be respected by debian, and version 1.2.3 will not be installed over version 1.2.3-beta.4 which is problematic as in semver precedence, it should.

A simple solution for that is described in this comment on the semver repository and is what is commit implements

kornelski commented 5 years ago

Thank you

fredszaq commented 5 years ago

would it be possible to release a version with this ?

kornelski commented 5 years ago

Done