mirror of
https://github.com/Xevion/spotify-quickauth.git
synced 2025-12-06 03:16:35 -06:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f583dac944 | |||
| dbfad44a51 | |||
| a636c6301a | |||
| 30d135a4dc | |||
| 62fb74a153 | |||
| c3e15fd9a5 | |||
| 0cc92b8978 | |||
| 2e15d81dc9 | |||
| 28faf71583 | |||
| 9ef2aac601 | |||
| 7e7af5920b | |||
| 978b0ab264 | |||
| a4568b2e72 | |||
| 7eaea3e2f4 | |||
| 22606aad30 |
@@ -1,6 +1,3 @@
|
||||
[target.x86_64-unknown-linux-musl]
|
||||
runner = "musl-gcc"
|
||||
|
||||
[profile.release]
|
||||
opt-level = "z"
|
||||
strip = true
|
||||
|
||||
4
.github/workflows/build.yaml
vendored
4
.github/workflows/build.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build
|
||||
name: build
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: stable
|
||||
toolchain: 1.74
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Cache Rust dependencies
|
||||
|
||||
2
.github/workflows/integration.yaml
vendored
2
.github/workflows/integration.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Integration
|
||||
name: integration
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
2
.github/workflows/pages.yaml
vendored
2
.github/workflows/pages.yaml
vendored
@@ -1,4 +1,4 @@
|
||||
name: GitHub Pages
|
||||
name: github-pages
|
||||
|
||||
permissions:
|
||||
pages: write
|
||||
|
||||
86
.github/workflows/test.yaml
vendored
Normal file
86
.github/workflows/test.yaml
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
name: test
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths-ignore:
|
||||
- README.md
|
||||
- .gitignore
|
||||
- LICENSE
|
||||
- run.sh
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- README.md
|
||||
- .gitignore
|
||||
- LICENSE
|
||||
- run.sh
|
||||
schedule:
|
||||
- cron: '30 14 * * 1' # every Monday, 9:30 AM CDT
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: true
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-musl
|
||||
tools: musl-tools
|
||||
artifact: true
|
||||
- os: macos-13
|
||||
target: x86_64-apple-darwin
|
||||
# - os: macos-latest
|
||||
# target: aarch64-apple-darwin
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: test-${{ matrix.os }}-${{ matrix.target }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: 1.74
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install Linker Tools
|
||||
if: matrix.tools
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install ${{ matrix.tools }}
|
||||
# ensure has a newline at the end
|
||||
[ "$(tail -c 1 .cargo/config.toml)" != "" ] && echo >> .cargo/config.toml
|
||||
cat .cargo/config.github.toml >> .cargo/config.toml
|
||||
|
||||
- name: Cache Rust dependencies
|
||||
uses: actions/cache@v4.0.2
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry/index
|
||||
~/.cargo/registry/cache
|
||||
~/.cargo/git
|
||||
target
|
||||
key: testing-${{ runner.os }}-${{ matrix.target }}-${{ hashFiles('Cargo.lock') }}
|
||||
restore-keys: |
|
||||
testing-${{ runner.os }}-${{ matrix.target }}-
|
||||
testing-${{ runner.os }}-
|
||||
|
||||
- name: Run tests
|
||||
run: cargo test --verbose --target ${{ matrix.target }}
|
||||
|
||||
- name: Build
|
||||
if: matrix.artifact
|
||||
run: cargo build --verbose --target ${{ matrix.target }}
|
||||
|
||||
- name: Upload Artifact
|
||||
if: matrix.artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: spotify-quickauth-${{ github.sha }}-${{ matrix.target }}
|
||||
path: target/${{ matrix.target }}/debug/spotify-quickauth
|
||||
@@ -1,7 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Remove all lines starting with >[! from CARGO_README.md
|
||||
sed -i '/^>\[!/d' CARGO_README.md
|
||||
# TODO: Only run when README.md is modified
|
||||
# TODO: Support partial staging, where the 'Staged' version is copied to CARGO_README.md, and then `sed` is ran.
|
||||
|
||||
# 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
|
||||
@@ -1,7 +1,11 @@
|
||||
# spotify-quickauth
|
||||
|
||||
[](https://github.com/Xevion/spotify-quickauth/actions)
|
||||
[](https://github.com/Xevion/spotify-quickauth/actions)
|
||||
[](https://github.com/Xevion/spotify-quickauth/actions)
|
||||
[](https://crates.io/crates/spotify-quickauth)
|
||||

|
||||

|
||||
<!-- TODO: Add testing status badge -->
|
||||
|
||||
|
||||
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].
|
||||
@@ -10,8 +14,6 @@ A simple CLI-based application for creating a `credentials.json` file, used by `
|
||||
- Automatically places configuration files
|
||||
- No dependencies, no installation, no fuss
|
||||
|
||||
>This README is literally filled with lies. I'm not joking, I've just typed up a bunch of features I plan to implement, and am planning them out now. A fair amount of it works, but most of the specific options aren't currently implemented. I'm working on it, I promise!
|
||||
|
||||
## Quickstart
|
||||
|
||||
You can run this application without installing anything by using the following commands.
|
||||
@@ -47,7 +49,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 +60,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 +106,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
|
||||
[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
|
||||
11
CHANGELOG.md
Normal file
11
CHANGELOG.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## v0.1.6
|
||||
|
||||
- Began tracking changes in the `CHANGELOG.md` file.
|
||||
- [breaking] Lowered MSRV to 1.74 to match `librespot`'s `0.5.0-dev` branch.
|
||||
- Fixed `pre-commit` hook to properly process the `CARGO_README.md` file.
|
||||
- Added testing workflow to the repository, targeting only major x64 platforms.
|
||||
- New testing badge in README
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -1287,7 +1287,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "spotify-quickauth"
|
||||
version = "0.1.5"
|
||||
version = "0.1.6"
|
||||
dependencies = [
|
||||
"env_logger",
|
||||
"futures",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
[package]
|
||||
name = "spotify-quickauth"
|
||||
version = "0.1.5"
|
||||
version = "0.1.6"
|
||||
edition = "2021"
|
||||
description = "Quickly authenticate librespot-based applications with Spotify"
|
||||
rust-version = "1.81"
|
||||
rust-version = "1.74"
|
||||
authors = ["Ryan Walters <xevion@xevion.dev>"]
|
||||
homepage = "https://github.com/Xevion/spotify-quickauth"
|
||||
repository = "https://github.com/Xevion/spotify-quickauth"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# spotify-quickauth
|
||||
|
||||
[](https://github.com/Xevion/spotify-quickauth/actions)
|
||||
<!-- TODO: Add testing status badge -->
|
||||
[](https://github.com/Xevion/spotify-quickauth/actions)
|
||||
[](https://github.com/Xevion/spotify-quickauth/actions)
|
||||
[](https://crates.io/crates/spotify-quickauth)
|
||||

|
||||

|
||||
|
||||
<!-- TODO: Add testing status badge -->
|
||||
|
||||
|
||||
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].
|
||||
@@ -14,9 +14,6 @@ A simple CLI-based application for creating a `credentials.json` file, used by `
|
||||
- Automatically places configuration files
|
||||
- No dependencies, no installation, no fuss
|
||||
|
||||
>[!WARNING]
|
||||
>This README is literally filled with lies. I'm not joking, I've just typed up a bunch of features I plan to implement, and am planning them out now. A fair amount of it works, but most of the specific options aren't currently implemented. I'm working on it, I promise!
|
||||
|
||||
## Quickstart
|
||||
|
||||
You can run this application without installing anything by using the following commands.
|
||||
|
||||
Reference in New Issue
Block a user