Skip to content

Instantly share code, notes, and snippets.

@murilogteixeira
Forked from rxmichael/cocoapod.sh
Created February 15, 2024 17:42
Show Gist options
  • Save murilogteixeira/3bb11125b1a0d2cba9e6e2302e05e8f9 to your computer and use it in GitHub Desktop.
Save murilogteixeira/3bb11125b1a0d2cba9e6e2302e05e8f9 to your computer and use it in GitHub Desktop.
Podspec update script
#!/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