Closed anthrotype closed 1 month ago
/cc @chrissimpkins
is this testable in any way?
well, you could call cargo binstall from the command line overriding the same flags that I have changed in the manifest:
$ cargo binstall --pkg-url="{ repo }/releases/download/{ name }-v{ version }/{ name }-{ target }{ archive-suffix }" --bin-dir="{ bin }{ binary-ext }" --pkg-fmt="tgz" fontc@0.0.1
if we merge these changes and release them to crates.io, then for the new releases one will be able to simply use cargo binstall fontc
or cargo binstall fontc@0.1.0
etc.
there's this nice cargo sub-command called https://github.com/cargo-bins/cargo-binstall which allows one to install pre-compiled binaries for one's own platform/architecture that are hosted on Github Releases.
This is particularly useful e.g. for https://github.com/googlefonts/fontc-action where one would like to install fontc the quickest way possible instead of building from source.
Usually cargo binstall just works and it requires no configuation, but in our particular case, because we push prefixed tags like
fontc-v{version}
instead of barev{version}
, then cargo binstall cannot automatically find the github releases download URL, and falls back to the slowercargo install
(from source).This little change to fontc/Cargo.toml should make sure the correct URL will be used.