Skip to content

Commit

Permalink
Fixes logic that ensures plist version matches cocoapods version.
Browse files Browse the repository at this point in the history
  • Loading branch information
kzaher committed Sep 30, 2017
1 parent ecb9ba5 commit 2f4d2e9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions scripts/all-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,10 @@ function checkPlistVersions() {
PODSPEC_VERSION=`cat $project.podspec | grep -E "s.version\s+=" | cut -d '"' -f 2`
ensureVersionEqual "$RXSWIFT_VERSION" "$PODSPEC_VERSION" "${project} version not equal"
PLIST_VERSION=`defaults read "\`pwd\`/${project}/Info.plist" CFBundleShortVersionString`
if [[ "${PLIST_VERSION}" != "${RXSWIFT_VERSION}" ]]; then
if [[ ${RXSWIFT_VERSION} = *"-"* && "${PLIST_VERSION}-"* == "${RXSWIFT_VERSION}" ]] || [[ ! ${RXSWIFT_VERSION} == *"-"* && "${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
done

ensureNoGitChanges "Plist versions aren't correct"
}

ensureNoGitChanges "Please make sure the working tree is clean. Use \`git status\` to check."
Expand Down

0 comments on commit 2f4d2e9

Please sign in to comment.