-
Notifications
You must be signed in to change notification settings - Fork 498
Add cargo-binstall support and adopt Rust target triple naming #1390
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
base: master
Are you sure you want to change the base?
Changes from all commits
f8b7b62
7344c97
0c7b795
1020ef8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| [package] | ||
| authors = ["Simon Persson <simon@flaskpost.org>", "Sven Lechner <sven.lechner@rwth-aachen.de>", "eladyn <eladyn@protonmail.com>"] | ||
| authors = [ | ||
| "Simon Persson <simon@flaskpost.org>", | ||
| "Sven Lechner <sven.lechner@rwth-aachen.de>", | ||
| "eladyn <eladyn@protonmail.com>", | ||
| ] | ||
| edition = "2024" | ||
| name = "spotifyd" | ||
| description = "A Spotify daemon" | ||
|
|
@@ -23,7 +27,12 @@ libc = "0.2.82" | |
| log = "0.4.6" | ||
| serde = { version = "1.0.115", features = ["derive"] } | ||
| sha-1 = "0.10" | ||
| tokio = {version = "1.44.2", features = ["signal", "rt-multi-thread", "process", "io-std"] } | ||
| tokio = { version = "1.44.2", features = [ | ||
| "signal", | ||
| "rt-multi-thread", | ||
| "process", | ||
| "io-std", | ||
| ] } | ||
| tokio-stream = "0.1.7" | ||
| url = "2.2.2" | ||
| librespot-audio = { version = "0.8.0", default-features = false } | ||
|
|
@@ -38,7 +47,9 @@ toml = "0.9.8" | |
| color-eyre = "0.6" | ||
| directories = "6.0.0" | ||
| thiserror = "2.0" | ||
| time = { version = "0.3.37", default-features = false, features = ["formatting"] } | ||
| time = { version = "0.3.37", default-features = false, features = [ | ||
| "formatting", | ||
| ] } | ||
| clap = { version = "4.5.23", features = ["derive"] } | ||
| serde_ignored = "0.1.10" | ||
|
|
||
|
|
@@ -71,9 +82,21 @@ rodiojack_backend = ["librespot-playback/rodiojack-backend"] | |
| depends = "$auto" | ||
| features = ["pulseaudio_backend", "dbus_mpris"] | ||
| assets = [ | ||
| ["target/release/spotifyd", "usr/bin/", "755"], | ||
| ["README.md", "usr/share/doc/spotifyd/README", "644"], | ||
| ["contrib/spotifyd.service", "etc/systemd/user/", "644"], | ||
| [ | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is rather picky, but maybe we can keep the previous formatting of the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No problem at all, I'll revert to the original formatting. Consistency is important. |
||
| "target/release/spotifyd", | ||
| "usr/bin/", | ||
| "755", | ||
| ], | ||
| [ | ||
| "README.md", | ||
| "usr/share/doc/spotifyd/README", | ||
| "644", | ||
| ], | ||
| [ | ||
| "contrib/spotifyd.service", | ||
| "etc/systemd/user/", | ||
| "644", | ||
| ], | ||
| ] | ||
|
|
||
| [package.metadata.generate-rpm] | ||
|
|
@@ -83,6 +106,13 @@ assets = [ | |
| { source = "contrib/spotifyd.service", dest = "/etc/systemd/user/spotifyd.service", mode = "644" }, | ||
| ] | ||
|
|
||
| # cargo-binstall support | ||
| [package.metadata.binstall] | ||
| pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }-full{ archive-suffix }" | ||
| bin-dir = "{ bin }{ binary-ext }" | ||
| pkg-fmt = "tgz" | ||
| disabled-strategies = ["quick-install", "compile"] | ||
|
|
||
| [profile.release] | ||
| lto = true | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely sure, but I think the code above will remove
-legacybefore publishing the release. And probably, if we want to keep a legacy version, this should keep the identical naming as previously.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes you’re right, the packaging step removes the
-legacysuffix, so legacy artifacts would not retain their original naming and this could lead to confusion or potential naming conflicts. I can remove theartifact_name=${artifact_name%-legacyline so legacy releases keep the-legacysuffix and preserve the previous naming format. Does that approach work for you?