diff --git a/scripts/validate-podspec.sh b/scripts/validate-podspec.sh index ec516a67..eb1e4fb7 100755 --- a/scripts/validate-podspec.sh +++ b/scripts/validate-podspec.sh @@ -3,6 +3,15 @@ set -e +function cleanup { + pushd ~/.cocoapods/repos/master + git clean -d -f + git reset master --hard + popd +} + +trap cleanup EXIT + VERSION=`cat RxSwift.podspec | grep -E "s.version\s+=" | cut -d '"' -f 2` pushd ~/.cocoapods/repos/master @@ -27,8 +36,3 @@ sed -E "s/s.source[^\}]+\}/s.source = { :git => '\/Users\/kzaher\/Proj pod lib lint RxSwift.podspec pod lib lint RxCocoa.podspec pod lib lint RxBlocking.podspec - -pushd ~/.cocoapods/repos/master -git clean -d -f -git reset master --hard -popd