From d60b16f633a6e937dfe4f147a2627f3e2701950b Mon Sep 17 00:00:00 2001 From: Karl Moskowski Date: Thu, 4 Jan 2018 09:03:59 -0500 Subject: [PATCH] =?UTF-8?q?Ensure=20cocoapods=20is=20installed=20before=20?= =?UTF-8?q?performing=20the=20release=20=E2=80=9Csanity=20check=E2=80=9D?= =?UTF-8?q?=20(#860)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Configurations/make-release-package.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Configurations/make-release-package.sh b/Configurations/make-release-package.sh index 8580c55adf..0e994806be 100755 --- a/Configurations/make-release-package.sh +++ b/Configurations/make-release-package.sh @@ -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"