-
-
Save yageek/c4f2e673bd8bacb2e2f457fb4e420af4 to your computer and use it in GitHub Desktop.
Podspec update script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sources="https://github.com/CocoaPods/Specs.git" | |
podRepo="INSERT YOUR PRIVATE POD REPO HERE" | |
echo "--------tag list--------" | |
git tag -l | |
echo "--------tag list--------" | |
# Grab pod name | |
podspecName=$(basename $(find . -name *.podspec) | sed 's/.podspec//g' ) | |
version=$(awk '/\.version/' $podspecName.podspec | awk '/[0-9]\.[0-9]\.[0-9]/' | sed 's/.version//g' | sed 's/[^0-9/.]//g') | |
echo $podspecName $version | |
pod lib lint --allow-warnings --sources=$sources | |
# Pod lint fail | |
if [ $? != 0 ];then | |
exit 1 | |
fi | |
git tag -m "update podspec" $version | |
git push --tags | |
pod repo push $podRepo $podspecName.podspec --allow-warnings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment