!/bin/sh
path=1"
echo "\n ------ 获取目前版本号 ------ \n"
for element in ls "$path" | tr " " "\?"
do
element=tr "\?" " " <<<$element
dir_or_file="element"
if [ -d "( find "{v1##/}
if [ -n "{ver2%.}
array1=({#array1[@]}
version1={version1//'/}
fi
else
var=element" -name '*.podspec' )
var1=var1 "
echo "\n ------ 获取目前版本号 ------ \n"
my_file=(echo {search_str}")
if [ ["$result" != ""] ]
then
array=(${result// / })
count=${#array[@]}
p_version=${array[count - 1]}
p_version=${p_version//\'/}
if [ -n "$p_version" ];then
podspec_version=${p_version}
fi
fi
done < $my_file
echo "podspec_version: {var1} | cut -d : -f1`
sed -i "" "{podspec_version}/""{var1}
echo "\n ------ 修改检测版本号 ------ \n"
find . -name *.txt | rename "s/2/"
find . -name *.txt | rename "s/"""/""/"
find . -name *.txt | rename "s/"""/""/"
echo "\n ------ git 本地提交代码操作 ------ \n"
git 操作
git add .
git status
git commit -m $podspec_version
git推送到远端
git tag $2
git push origin master --tags
echo "\n ------ 发布模块版本 ------ \n"
pod repo push IOSMavenSpec ${var1} --allow-warnings --skip-import-validation