Merge branch 'master' into dev

This commit is contained in:
Sasha Hilton 2021-02-20 23:31:04 +00:00
commit 7f705ed148
9 changed files with 136 additions and 45 deletions

14
Cargo.lock generated
View file

@ -1391,7 +1391,7 @@ dependencies = [
[[package]]
name = "librespot"
version = "0.1.3"
version = "0.1.5"
dependencies = [
"base64 0.13.0",
"env_logger",
@ -1420,7 +1420,7 @@ dependencies = [
[[package]]
name = "librespot-audio"
version = "0.1.3"
version = "0.1.5"
dependencies = [
"aes-ctr",
"bit-set",
@ -1439,7 +1439,7 @@ dependencies = [
[[package]]
name = "librespot-connect"
version = "0.1.3"
version = "0.1.5"
dependencies = [
"aes-ctr",
"base64 0.13.0",
@ -1466,7 +1466,7 @@ dependencies = [
[[package]]
name = "librespot-core"
version = "0.1.3"
version = "0.1.5"
dependencies = [
"aes",
"base64 0.13.0",
@ -1502,7 +1502,7 @@ dependencies = [
[[package]]
name = "librespot-metadata"
version = "0.1.3"
version = "0.1.5"
dependencies = [
"byteorder",
"futures",
@ -1515,7 +1515,7 @@ dependencies = [
[[package]]
name = "librespot-playback"
version = "0.1.3"
version = "0.1.5"
dependencies = [
"alsa",
"byteorder",
@ -1541,7 +1541,7 @@ dependencies = [
[[package]]
name = "librespot-protocol"
version = "0.1.3"
version = "0.1.5"
dependencies = [
"glob",
"protobuf",

View file

@ -1,6 +1,6 @@
[package]
name = "librespot"
version = "0.1.3"
version = "0.1.5"
authors = ["Librespot Org"]
license = "MIT"
description = "An open source client library for Spotify, with support for Spotify Connect"
@ -22,22 +22,22 @@ doc = false
[dependencies.librespot-audio]
path = "audio"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-connect]
path = "connect"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-core]
path = "core"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-metadata]
path = "metadata"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-playback]
path = "playback"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-protocol]
path = "protocol"
version = "0.1.3"
version = "0.1.5"
[dependencies]
base64 = "0.13"

View file

@ -1,6 +1,6 @@
[package]
name = "librespot-audio"
version = "0.1.3"
version = "0.1.5"
authors = ["Paul Lietar <paul@lietar.net>"]
description="The audio fetching and processing logic for librespot"
license="MIT"
@ -8,7 +8,7 @@ edition = "2018"
[dependencies.librespot-core]
path = "../core"
version = "0.1.3"
version = "0.1.5"
[dependencies]
bit-set = "0.5"

View file

@ -1,6 +1,6 @@
[package]
name = "librespot-connect"
version = "0.1.3"
version = "0.1.5"
authors = ["Paul Lietar <paul@lietar.net>"]
description = "The discovery and Spotify Connect logic for librespot"
license = "MIT"
@ -9,13 +9,13 @@ edition = "2018"
[dependencies.librespot-core]
path = "../core"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-playback]
path = "../playback"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-protocol]
path = "../protocol"
version = "0.1.3"
version = "0.1.5"
[dependencies]
base64 = "0.13"

View file

@ -1,6 +1,6 @@
[package]
name = "librespot-core"
version = "0.1.3"
version = "0.1.5"
authors = ["Paul Lietar <paul@lietar.net>"]
build = "build.rs"
description = "The core functionality provided by librespot"
@ -10,7 +10,7 @@ edition = "2018"
[dependencies.librespot-protocol]
path = "../protocol"
version = "0.1.3"
version = "0.1.5"
[dependencies]
base64 = "0.13"

View file

@ -1,6 +1,6 @@
[package]
name = "librespot-metadata"
version = "0.1.3"
version = "0.1.5"
authors = ["Paul Lietar <paul@lietar.net>"]
description = "The metadata logic for librespot"
license = "MIT"
@ -16,7 +16,7 @@ log = "0.4"
[dependencies.librespot-core]
path = "../core"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-protocol]
path = "../protocol"
version = "0.1.3"
version = "0.1.5"

View file

@ -1,6 +1,6 @@
[package]
name = "librespot-playback"
version = "0.1.3"
version = "0.1.5"
authors = ["Sasha Hilton <sashahilton00@gmail.com>"]
description = "The audio playback logic for librespot"
license = "MIT"
@ -9,13 +9,13 @@ edition = "2018"
[dependencies.librespot-audio]
path = "../audio"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-core]
path = "../core"
version = "0.1.3"
version = "0.1.5"
[dependencies.librespot-metadata]
path = "../metadata"
version = "0.1.3"
version = "0.1.5"
[dependencies]
futures = "0.1"

View file

@ -1,6 +1,6 @@
[package]
name = "librespot-protocol"
version = "0.1.3"
version = "0.1.5"
authors = ["Paul Liétar <paul@lietar.net>"]
build = "build.rs"
description = "The protobuf logic for communicating with Spotify servers"

View file

@ -1,16 +1,25 @@
#!/bin/bash
SKIP_MERGE='false'
DRY_RUN='false'
WORKINGDIR="$( cd "$(dirname "$0")" ; pwd -P )"
cd $WORKINGDIR
crates=( "protocol" "core" "audio" "metadata" "playback" "connect" "librespot" )
function switchBranch {
# You are expected to have committed/stashed your changes before running this.
echo "Switching to master branch and merging development."
git checkout master
git pull
git merge dev
if [ "$SKIP_MERGE" = 'false' ] ; then
# You are expected to have committed/stashed your changes before running this.
echo "Switching to master branch and merging development."
git checkout master
git pull
if [ "$DRY_RUN" = 'true' ] ; then
git merge --no-commit --no-ff dev
else
git merge dev
fi
fi
}
function updateVersion {
@ -26,15 +35,25 @@ function updateVersion {
echo "Path is $crate_path"
if [ "$CRATE" = "librespot" ]
then
cargo update
git add . && git commit -a -m "Update Cargo.lock"
if [ "$DRY_RUN" = 'true' ] ; then
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
done
}
function commitAndTag {
git commit -a -m "Update version numbers to $1"
git tag "v$1" -a -m "Update to version $1"
if [ "$DRY_RUN" = 'true' ] ; then
# 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 {
@ -72,9 +91,17 @@ function publishCrates {
if [ "$CRATE" == "protocol" ]
then
# 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
cargo publish
if [ "$DRY_RUN" = 'true' ] ; then
cargo publish --dry-run
else
cargo publish
fi
fi
echo "Successfully published $crate_name to crates.io"
remoteWait 30 $crate_name
@ -83,10 +110,32 @@ function publishCrates {
function updateRepo {
cd $WORKINGDIR
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
if [ "$DRY_RUN" = 'true' ] ; then
echo "Pushing to master branch of repo. [DRY RUN]"
git push --dry-run origin master
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 {
@ -105,5 +154,47 @@ function run {
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.
run $1