hass-core/script/pip_check
Teemu R 483545eeaa
Bump python-songpal dependency to 0.14 (#66769)
* Bump python-songpal dependency to 0.14

* Fix tests

* pip_check -1

Co-authored-by: Franck Nijhof <git@frenck.dev>
2022-02-18 11:31:46 +02:00

27 lines
805 B
Bash
Executable file

#!/bin/bash
PIP_CACHE=$1
# Number of existing dependency conflicts
# Update if a PR resolve one!
DEPENDENCY_CONFLICTS=9
PIP_CHECK=$(pip check --cache-dir=$PIP_CACHE)
LINE_COUNT=$(echo "$PIP_CHECK" | wc -l)
echo "$PIP_CHECK"
if [[ $((LINE_COUNT)) -gt $DEPENDENCY_CONFLICTS ]]
then
echo "------"
echo "Requirements change added another dependency conflict."
echo "Make sure to check the 'pip check' output above!"
exit 1
elif [[ $((LINE_COUNT)) -lt $DEPENDENCY_CONFLICTS ]]
then
echo "------"
echo "It seems like this PR resolves $((
DEPENDENCY_CONFLICTS - LINE_COUNT)) dependency conflicts."
echo "Please update the 'DEPENDENCY_CONFLICTS' constant "
echo "in 'script/pip_check' to help prevent regressions."
echo "Update it to: $((LINE_COUNT))"
exit 1
fi