pod 库发布脚本

repo_tag.sh 文件

#!/bin/zsh

# 私有库名称
#PODNAME=${PWD##*/}
PODNAME="LBHorizontalCenterLayout"

function obtain_git_tag
{
  # 类似 "s.version    = '0.0.1'"
  VERSION_STRING=`grep -E 's.version.*=' ${PODNAME}.podspec`
  TAG=`tr -cd "[0-9.]" <<< "$VERSION_STRING"`
  TAG=${TAG#*${TAG:0:1}}
  echo ${TAG}
}
# 当前tag
TAG=`obtain_git_tag`
echo "准备发版的版本号:$TAG"
if [ "$TAG" = "" ]; then
   echo "match tag failed"
   exit 1
fi

function judgeResult()
{
	result=$1
	if [ result != 0 ];then
		exit $result
	fi
}

git add .

git commit -m "${PODNAME} ${TAG}"

git push origin

git tag  $TAG || judgeResult $?

git push origin $TAG || judgeResult $?

repo_push.sh文件

pod trunk push  $PROJECT_NAME.podspec  --allow-warnings --verbose

相关推荐

  1. pod 发布脚本

    2024-05-25 22:20:10       36 阅读
  2. k8s配置pods滚动发布

    2024-05-25 22:20:10       40 阅读
  3. iOS pod包含MRC类

    2024-05-25 22:20:10       29 阅读
  4. Nodejs一键发布脚本

    2024-05-25 22:20:10       59 阅读
  5. Jenkins: 配置自动化发布脚本

    2024-05-25 22:20:10       46 阅读
  6. 写一个shell脚本:进入pod服务运行命令

    2024-05-25 22:20:10       44 阅读
  7. 利用python编写简易POC脚本

    2024-05-25 22:20:10       52 阅读
  8. 课时156:脚本发布_简单脚本_变量转化

    2024-05-25 22:20:10       38 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-25 22:20:10       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-25 22:20:10       101 阅读
  3. 在Django里面运行非项目文件

    2024-05-25 22:20:10       82 阅读
  4. Python语言-面向对象

    2024-05-25 22:20:10       91 阅读

热门阅读

  1. github下载代码

    2024-05-25 22:20:10       21 阅读
  2. Flink 部署执行模式

    2024-05-25 22:20:10       27 阅读
  3. 华为UPS关机软件NetShutdown Ubuntu 开机自启动

    2024-05-25 22:20:10       29 阅读
  4. Django的model中的Manager对象

    2024-05-25 22:20:10       32 阅读
  5. Kubernetes 之 Pod 容忍度与节点污点

    2024-05-25 22:20:10       31 阅读
  6. clickhouse生产运维以及调优

    2024-05-25 22:20:10       28 阅读
  7. Android Studio 问题集锦

    2024-05-25 22:20:10       36 阅读
  8. C++ char[]、char*、const char*、string 相互转换

    2024-05-25 22:20:10       29 阅读
  9. frm一级4个1大神复习经验分享系列(二)

    2024-05-25 22:20:10       32 阅读
  10. TODOLIST

    TODOLIST

    2024-05-25 22:20:10      24 阅读