From 22606aad30447b7c6596d8ed1cc71ce1719b7642 Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 7 Oct 2024 13:28:47 -0500 Subject: [PATCH] Fix pre-commit.sh hook --- .hooks/pre-commit.sh | 4 ++-- CARGO_README.md | 31 ++++++++++++++++++++++++++++--- README.md | 3 +-- 3 files changed, 31 insertions(+), 7 deletions(-) diff --git a/.hooks/pre-commit.sh b/.hooks/pre-commit.sh index 76a1779..f54463e 100755 --- a/.hooks/pre-commit.sh +++ b/.hooks/pre-commit.sh @@ -1,7 +1,7 @@ #!/bin/sh -# Remove all lines starting with >[! from CARGO_README.md -sed -i '/^>\[!/d' CARGO_README.md +# Remove markdown extension lines for Cargo publishing +sed '/^>\[!/d' README.md > CARGO_README.md # Add the modified file to the commit git add CARGO_README.md \ No newline at end of file diff --git a/CARGO_README.md b/CARGO_README.md index 51b9993..db5b4f8 100644 --- a/CARGO_README.md +++ b/CARGO_README.md @@ -2,6 +2,9 @@ [![Build Status](https://github.com/Xevion/spotify-quickauth/workflows/Build/badge.svg)](https://github.com/Xevion/spotify-quickauth/actions) [![Crates.io](https://img.shields.io/crates/v/spotify-quickauth.svg)](https://crates.io/crates/spotify-quickauth) +![Crates.io MSRV](https://img.shields.io/crates/msrv/spotify-quickauth) +![GitHub last commit](https://img.shields.io/github/last-commit/Xevion/spotify-quickauth) + A simple CLI-based application for creating a `credentials.json` file, used by `librespot` derived applications, such as [spotify-player][spotify-player], [spotifyd][spotifyd], and [raspotify][raspotify]. @@ -47,7 +50,7 @@ Installation is not necessary to use this application, but if you're having trou ### Pre-built Binaries -Binaries are always available for download from the [releases page][releases], and they're the same ones used by the shell scripts above. +Binaries are always available for download from the [releases page][latestRelease], and they're the same ones used by the shell scripts above. Currently, the following targets are available for download: - x64 Linux (MUSL) `x86_64-unknown-linux-musl` @@ -58,14 +61,33 @@ Currently, the following targets are available for download: - x64 Windows `x86_64-pc-windows-msvc` - ARM64 Windows `aarch64-pc-windows-msvc` +Please [file an issue][new-issue] if you are on a platform that is not supported, or if you encounter issues with the binaries. + +### Via `cargo-binstall` + +> If the package cannot be found for your target or fails to be downloaded for any reason, `cargo-binstall` will automatically fall back to building the package from source. + +`cargo-binstall` is a tool that allows you to install binaries from crates.io without needing to compile them yourself. + +``` +cargo binstall spotify-quickauth +``` + +If you're curious where the binary comes from, `cargo-binstall` will likely pull the binary directly from the [latest release][latestRelease] by this repository, selecting the most appropriate target for your host. + + +### Manual Installation + If you'd like to use the shell script above to install the binary, you can use the `-S/--stop` flag to prevent the script from running the binary after downloading it. It implicitly applies the `--keep` flag too. +You'll need to move the binary yourself though: + ```bash curl -sSL https://xevion.github.io/spotify-quickauth/run.sh | sh -s -- -S mv spotify-quickauth /usr/local/bin ``` -Then you can move it to whatever location you'd like. Make sure that directory is in your $PATH though! +Make sure your directory of choice is in your $PATH though! ### Building from Source @@ -85,10 +107,13 @@ If you have any troubles building the project - Make sure you're using a target that's supported by the project (see above). - Certain targets may require specfic linkers. For example, +[latestRelease]: https://github.com/Xevion/spotify-quickauth/releases/latest/ [spotify-player]: https://github.com/aome510/spotify-player [spotifyd]: https://github.com/Spotifyd/spotifyd [raspotify]: https://github.com/dtcooper/raspotify [rustup]: https://rustup.rs [git]: https://git-scm.com [binstall]: https://github.com/cargo-bins/cargo-binstall -[quickinstall]: https://github.com/cargo-bins/cargo-quickinstall \ No newline at end of file +[quickinstall]: https://github.com/cargo-bins/cargo-quickinstall +[binstall-installation]: https://github.com/cargo-bins/cargo-binstall#installation +[new-issue]: https://github.com/Xevion/spotify-quickauth/issues/new \ No newline at end of file diff --git a/README.md b/README.md index 29df287..ec58d18 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,10 @@ # spotify-quickauth [![Build Status](https://github.com/Xevion/spotify-quickauth/workflows/Build/badge.svg)](https://github.com/Xevion/spotify-quickauth/actions) - [![Crates.io](https://img.shields.io/crates/v/spotify-quickauth.svg)](https://crates.io/crates/spotify-quickauth) ![Crates.io MSRV](https://img.shields.io/crates/msrv/spotify-quickauth) ![GitHub last commit](https://img.shields.io/github/last-commit/Xevion/spotify-quickauth) - + A simple CLI-based application for creating a `credentials.json` file, used by `librespot` derived applications, such as [spotify-player][spotify-player], [spotifyd][spotifyd], and [raspotify][raspotify].