美文网首页
自动打包fastlane获取git log

自动打包fastlane获取git log

作者: 太平洋_cfd2 | 来源:发表于2022-11-04 15:05 被阅读0次
    lastArchiveDate = sh("cat /Users/guoxiaodi/Documents/test/guoxiaodi/guoxiaodi/fastlane/build/lastArchiveDate.log")
    sh("echo 'lastArchiveDate: #{lastArchiveDate}'")

    # 当前时间
    currentDate = `date +%Y-%m-%d_%T`
    sh("echo 'currentDate: #{currentDate}'")

    #更新日志
    updateLog = sh("git log --after='#{lastArchiveDate}' --before='#{currentDate}' --pretty=format:'1. ## <font color=DeepPink>%s</font>' HEAD")
    sh("echo 'updateLog: \n#{updateLog}'")
# 打包完成后,存储当前时间(第一次可终端直接运行echo语句)
sh("echo `date +%Y-%m-%d_%T` > /Users/guoxiaodi/Documents/test/guoxiaodi/guoxiaodi/fastlane/build/lastArchiveDate.log")

参考:
https://github.com/ljchen1129/iOSAutoTimingArchiveTask

相关文章

网友评论

      本文标题:自动打包fastlane获取git log

      本文链接:https://www.haomeiwen.com/subject/gqxutdtx.html