自动打包fastlane获取git log
2022-11-04 本文已影响0人
太平洋_cfd2
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")