mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
7f705ed148
9 changed files with 136 additions and 45 deletions
14
Cargo.lock
generated
14
Cargo.lock
generated
|
@ -1391,7 +1391,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "librespot"
|
name = "librespot"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.13.0",
|
"base64 0.13.0",
|
||||||
"env_logger",
|
"env_logger",
|
||||||
|
@ -1420,7 +1420,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "librespot-audio"
|
name = "librespot-audio"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes-ctr",
|
"aes-ctr",
|
||||||
"bit-set",
|
"bit-set",
|
||||||
|
@ -1439,7 +1439,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "librespot-connect"
|
name = "librespot-connect"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes-ctr",
|
"aes-ctr",
|
||||||
"base64 0.13.0",
|
"base64 0.13.0",
|
||||||
|
@ -1466,7 +1466,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "librespot-core"
|
name = "librespot-core"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
"aes",
|
||||||
"base64 0.13.0",
|
"base64 0.13.0",
|
||||||
|
@ -1502,7 +1502,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "librespot-metadata"
|
name = "librespot-metadata"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"futures",
|
"futures",
|
||||||
|
@ -1515,7 +1515,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "librespot-playback"
|
name = "librespot-playback"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alsa",
|
"alsa",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
|
@ -1541,7 +1541,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "librespot-protocol"
|
name = "librespot-protocol"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"glob",
|
"glob",
|
||||||
"protobuf",
|
"protobuf",
|
||||||
|
|
14
Cargo.toml
14
Cargo.toml
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librespot"
|
name = "librespot"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
authors = ["Librespot Org"]
|
authors = ["Librespot Org"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
description = "An open source client library for Spotify, with support for Spotify Connect"
|
description = "An open source client library for Spotify, with support for Spotify Connect"
|
||||||
|
@ -22,22 +22,22 @@ doc = false
|
||||||
|
|
||||||
[dependencies.librespot-audio]
|
[dependencies.librespot-audio]
|
||||||
path = "audio"
|
path = "audio"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-connect]
|
[dependencies.librespot-connect]
|
||||||
path = "connect"
|
path = "connect"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-core]
|
[dependencies.librespot-core]
|
||||||
path = "core"
|
path = "core"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-metadata]
|
[dependencies.librespot-metadata]
|
||||||
path = "metadata"
|
path = "metadata"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-playback]
|
[dependencies.librespot-playback]
|
||||||
path = "playback"
|
path = "playback"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-protocol]
|
[dependencies.librespot-protocol]
|
||||||
path = "protocol"
|
path = "protocol"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.13"
|
base64 = "0.13"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librespot-audio"
|
name = "librespot-audio"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
authors = ["Paul Lietar <paul@lietar.net>"]
|
authors = ["Paul Lietar <paul@lietar.net>"]
|
||||||
description="The audio fetching and processing logic for librespot"
|
description="The audio fetching and processing logic for librespot"
|
||||||
license="MIT"
|
license="MIT"
|
||||||
|
@ -8,7 +8,7 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies.librespot-core]
|
[dependencies.librespot-core]
|
||||||
path = "../core"
|
path = "../core"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bit-set = "0.5"
|
bit-set = "0.5"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librespot-connect"
|
name = "librespot-connect"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
authors = ["Paul Lietar <paul@lietar.net>"]
|
authors = ["Paul Lietar <paul@lietar.net>"]
|
||||||
description = "The discovery and Spotify Connect logic for librespot"
|
description = "The discovery and Spotify Connect logic for librespot"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -9,13 +9,13 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies.librespot-core]
|
[dependencies.librespot-core]
|
||||||
path = "../core"
|
path = "../core"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-playback]
|
[dependencies.librespot-playback]
|
||||||
path = "../playback"
|
path = "../playback"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-protocol]
|
[dependencies.librespot-protocol]
|
||||||
path = "../protocol"
|
path = "../protocol"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.13"
|
base64 = "0.13"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librespot-core"
|
name = "librespot-core"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
authors = ["Paul Lietar <paul@lietar.net>"]
|
authors = ["Paul Lietar <paul@lietar.net>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
description = "The core functionality provided by librespot"
|
description = "The core functionality provided by librespot"
|
||||||
|
@ -10,7 +10,7 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies.librespot-protocol]
|
[dependencies.librespot-protocol]
|
||||||
path = "../protocol"
|
path = "../protocol"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.13"
|
base64 = "0.13"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librespot-metadata"
|
name = "librespot-metadata"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
authors = ["Paul Lietar <paul@lietar.net>"]
|
authors = ["Paul Lietar <paul@lietar.net>"]
|
||||||
description = "The metadata logic for librespot"
|
description = "The metadata logic for librespot"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -16,7 +16,7 @@ log = "0.4"
|
||||||
|
|
||||||
[dependencies.librespot-core]
|
[dependencies.librespot-core]
|
||||||
path = "../core"
|
path = "../core"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-protocol]
|
[dependencies.librespot-protocol]
|
||||||
path = "../protocol"
|
path = "../protocol"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librespot-playback"
|
name = "librespot-playback"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
authors = ["Sasha Hilton <sashahilton00@gmail.com>"]
|
authors = ["Sasha Hilton <sashahilton00@gmail.com>"]
|
||||||
description = "The audio playback logic for librespot"
|
description = "The audio playback logic for librespot"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
|
@ -9,13 +9,13 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies.librespot-audio]
|
[dependencies.librespot-audio]
|
||||||
path = "../audio"
|
path = "../audio"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-core]
|
[dependencies.librespot-core]
|
||||||
path = "../core"
|
path = "../core"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
[dependencies.librespot-metadata]
|
[dependencies.librespot-metadata]
|
||||||
path = "../metadata"
|
path = "../metadata"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
futures = "0.1"
|
futures = "0.1"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "librespot-protocol"
|
name = "librespot-protocol"
|
||||||
version = "0.1.3"
|
version = "0.1.5"
|
||||||
authors = ["Paul Liétar <paul@lietar.net>"]
|
authors = ["Paul Liétar <paul@lietar.net>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
description = "The protobuf logic for communicating with Spotify servers"
|
description = "The protobuf logic for communicating with Spotify servers"
|
||||||
|
|
121
publish.sh
121
publish.sh
|
@ -1,16 +1,25 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
SKIP_MERGE='false'
|
||||||
|
DRY_RUN='false'
|
||||||
|
|
||||||
WORKINGDIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
WORKINGDIR="$( cd "$(dirname "$0")" ; pwd -P )"
|
||||||
cd $WORKINGDIR
|
cd $WORKINGDIR
|
||||||
|
|
||||||
crates=( "protocol" "core" "audio" "metadata" "playback" "connect" "librespot" )
|
crates=( "protocol" "core" "audio" "metadata" "playback" "connect" "librespot" )
|
||||||
|
|
||||||
function switchBranch {
|
function switchBranch {
|
||||||
# You are expected to have committed/stashed your changes before running this.
|
if [ "$SKIP_MERGE" = 'false' ] ; then
|
||||||
echo "Switching to master branch and merging development."
|
# You are expected to have committed/stashed your changes before running this.
|
||||||
git checkout master
|
echo "Switching to master branch and merging development."
|
||||||
git pull
|
git checkout master
|
||||||
git merge dev
|
git pull
|
||||||
|
if [ "$DRY_RUN" = 'true' ] ; then
|
||||||
|
git merge --no-commit --no-ff dev
|
||||||
|
else
|
||||||
|
git merge dev
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateVersion {
|
function updateVersion {
|
||||||
|
@ -26,15 +35,25 @@ function updateVersion {
|
||||||
echo "Path is $crate_path"
|
echo "Path is $crate_path"
|
||||||
if [ "$CRATE" = "librespot" ]
|
if [ "$CRATE" = "librespot" ]
|
||||||
then
|
then
|
||||||
cargo update
|
if [ "$DRY_RUN" = 'true' ] ; then
|
||||||
git add . && git commit -a -m "Update Cargo.lock"
|
cargo update --dry-run
|
||||||
|
git add . && git commit --dry-run -a -m "Update Cargo.lock"
|
||||||
|
else
|
||||||
|
cargo update
|
||||||
|
git add . && git commit -a -m "Update Cargo.lock"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function commitAndTag {
|
function commitAndTag {
|
||||||
git commit -a -m "Update version numbers to $1"
|
if [ "$DRY_RUN" = 'true' ] ; then
|
||||||
git tag "v$1" -a -m "Update to version $1"
|
# Skip tagging on dry run.
|
||||||
|
git commit --dry-run -a -m "Update version numbers to $1"
|
||||||
|
else
|
||||||
|
git commit -a -m "Update version numbers to $1"
|
||||||
|
git tag "v$1" -a -m "Update to version $1"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_crate_name {
|
function get_crate_name {
|
||||||
|
@ -72,9 +91,17 @@ function publishCrates {
|
||||||
if [ "$CRATE" == "protocol" ]
|
if [ "$CRATE" == "protocol" ]
|
||||||
then
|
then
|
||||||
# Protocol crate needs --no-verify option due to build.rs modification.
|
# Protocol crate needs --no-verify option due to build.rs modification.
|
||||||
cargo publish --no-verify
|
if [ "$DRY_RUN" = 'true' ] ; then
|
||||||
|
cargo publish --no-verify --dry-run
|
||||||
|
else
|
||||||
|
cargo publish --no-verify
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
cargo publish
|
if [ "$DRY_RUN" = 'true' ] ; then
|
||||||
|
cargo publish --dry-run
|
||||||
|
else
|
||||||
|
cargo publish
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo "Successfully published $crate_name to crates.io"
|
echo "Successfully published $crate_name to crates.io"
|
||||||
remoteWait 30 $crate_name
|
remoteWait 30 $crate_name
|
||||||
|
@ -83,10 +110,32 @@ function publishCrates {
|
||||||
|
|
||||||
function updateRepo {
|
function updateRepo {
|
||||||
cd $WORKINGDIR
|
cd $WORKINGDIR
|
||||||
echo "Pushing to master branch of repo."
|
if [ "$DRY_RUN" = 'true' ] ; then
|
||||||
git push origin master
|
echo "Pushing to master branch of repo. [DRY RUN]"
|
||||||
echo "Pushing v$1 tag to master branch of repo."
|
git push --dry-run origin master
|
||||||
git push origin v$1
|
echo "Pushing v$1 tag to master branch of repo. [DRY RUN]"
|
||||||
|
git push --dry-run origin v$1
|
||||||
|
|
||||||
|
# Cancels any merges in progress
|
||||||
|
git merge --abort
|
||||||
|
|
||||||
|
git checkout dev
|
||||||
|
git merge --no-commit --no-ff master
|
||||||
|
|
||||||
|
# Cancels above merge
|
||||||
|
git merge --abort
|
||||||
|
|
||||||
|
git push --dry-run
|
||||||
|
else
|
||||||
|
echo "Pushing to master branch of repo."
|
||||||
|
git push origin master
|
||||||
|
echo "Pushing v$1 tag to master branch of repo."
|
||||||
|
git push origin v$1
|
||||||
|
# Update the dev repo with latest version commit
|
||||||
|
git checkout dev
|
||||||
|
git merge master
|
||||||
|
git push
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function rebaseDev {
|
function rebaseDev {
|
||||||
|
@ -105,5 +154,47 @@ function run {
|
||||||
echo "Successfully published v$1 to crates.io and uploaded changes to repo."
|
echo "Successfully published v$1 to crates.io and uploaded changes to repo."
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#Set Script Name variable
|
||||||
|
SCRIPT=`basename ${BASH_SOURCE[0]}`
|
||||||
|
|
||||||
|
print_usage () {
|
||||||
|
local l_MSG=$1
|
||||||
|
if [ ! -z "${l_MSG}" ]; then
|
||||||
|
echo "Usage Error: $l_MSG"
|
||||||
|
fi
|
||||||
|
echo "Usage: $SCRIPT <args> <version>"
|
||||||
|
echo " where <version> specifies the version number in semver format, eg. 1.0.1"
|
||||||
|
echo "Recognized optional command line arguments"
|
||||||
|
echo "--dry-run -- Test the script before making live changes"
|
||||||
|
echo "--skip-merge -- Skip merging dev into master before publishing"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
### check number of command line arguments
|
||||||
|
NUMARGS=$#
|
||||||
|
if [ $NUMARGS -eq 0 ]; then
|
||||||
|
print_usage 'No command line arguments specified'
|
||||||
|
fi
|
||||||
|
|
||||||
|
while test $# -gt 0; do
|
||||||
|
case "$1" in
|
||||||
|
-h|--help)
|
||||||
|
print_usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--dry-run)
|
||||||
|
DRY_RUN='true'
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--skip-merge)
|
||||||
|
SKIP_MERGE='true'
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# First argument is new version number.
|
# First argument is new version number.
|
||||||
run $1
|
run $1
|
||||||
|
|
Loading…
Reference in a new issue