Skip to content

Commit

Permalink
Ensure cocoapods is installed before performing the release “sanity c…
Browse files Browse the repository at this point in the history
…heck” (#860)
  • Loading branch information
Karl Moskowski authored and kornelski committed Apr 6, 2018
1 parent de3e73b commit d60b16f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Configurations/make-release-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
set -e

if [ "$ACTION" = "" ] ; then
# Sanity check that the Podspec version matches the Sparkle version
spec_version=$(printf "require 'cocoapods'\nspec = %s\nprint spec.version" "$(cat "$SRCROOT/Sparkle.podspec")" | LANG=en_US.UTF-8 ruby)
if [ "$spec_version" != "$CURRENT_PROJECT_VERSION" ] ; then
echo "podspec version '$spec_version' does not match the current project version '$CURRENT_PROJECT_VERSION'" >&2
exit 1
# If using cocoapods, sanity check that the Podspec version matches the Sparkle version
if [ -x "$(command -v pod)" ]; then
spec_version=$(printf "require 'cocoapods'\nspec = %s\nprint spec.version" "$(cat "$SRCROOT/Sparkle.podspec")" | LANG=en_US.UTF-8 ruby)
if [ "$spec_version" != "$CURRENT_PROJECT_VERSION" ] ; then
echo "podspec version '$spec_version' does not match the current project version '$CURRENT_PROJECT_VERSION'" >&2
exit 1
fi
fi

rm -rf "$CONFIGURATION_BUILD_DIR/staging"
Expand Down

0 comments on commit d60b16f

Please sign in to comment.