Improves version detection.
This commit is contained in:
parent
154ac2583d
commit
e1f72cb566
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -35,15 +35,17 @@ function ensureNoGitChanges() {
|
||||||
|
|
||||||
function checkPlistVersions() {
|
function checkPlistVersions() {
|
||||||
RXSWIFT_VERSION=`cat RxSwift.podspec | grep -E "s.version\s+=" | cut -d '"' -f 2`
|
RXSWIFT_VERSION=`cat RxSwift.podspec | grep -E "s.version\s+=" | cut -d '"' -f 2`
|
||||||
|
echo "RxSwift version: ${RXSWIFT_VERSION}"
|
||||||
PROJECTS=(RxSwift RxCocoa RxBlocking RxTests)
|
PROJECTS=(RxSwift RxCocoa RxBlocking RxTests)
|
||||||
for project in ${PROJECTS[@]}
|
for project in ${PROJECTS[@]}
|
||||||
do
|
do
|
||||||
echo "Checking version for ${project}"
|
echo "Checking version for ${project}"
|
||||||
PODSPEC_VERSION=`cat $project.podspec | grep -E "s.version\s+=" | cut -d '"' -f 2`
|
PODSPEC_VERSION=`cat $project.podspec | grep -E "s.version\s+=" | cut -d '"' -f 2`
|
||||||
ensureVersionEqual "$RXSWIFT_VERSION" "$PODSPEC_VERSION" "${project} version not equal"
|
ensureVersionEqual "$RXSWIFT_VERSION" "$PODSPEC_VERSION" "${project} version not equal"
|
||||||
if [[ `defaults write "\`pwd\`/${project}/Info.plist" CFBundleShortVersionString $RXSWIFT_VERSION` != $RXSWIFT_VERSION ]]; then
|
PLIST_VERSION=`defaults read "\`pwd\`/${project}/Info.plist" CFBundleShortVersionString`
|
||||||
defaults write "`pwd`/${project}/Info.plist" CFBundleShortVersionString $RXSWIFT_VERSION
|
if [[ "${PLIST_VERSION}" != "${RXSWIFT_VERSION}" ]]; then
|
||||||
|
echo "Invalid version for `pwd`/${project}/Info.plist: ${PLIST_VERSION}"
|
||||||
|
defaults write "`pwd`/${project}/Info.plist" CFBundleShortVersionString $RXSWIFT_VERSION
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue