首页 > 学院 > 开发设计 > 正文

得到提交日期

2019-11-06 07:58:38
字体:
来源:转载
供稿:网友

get_data_by_changeId.sh

#!/bin/shif [ $# -lt 2 ]then echo "[usage]: ./get_date_by_changeId [PRoject_location] [changeId]" exit 1fi#func get the date line by changeIdget_date_by_changeId(){ CURRENT_PATH=`pwd` cd $1 git log --grep="$2" --pretty="%ad" --date=rfc if [ $? ] then cd $CURRENT_PATH return 1 else cd $CURRENT_PATH return 0 fi}DATE_CHANGED=`get_date_by_changeId $1 $2`if [ -n "$DATE_CHANGED" ]then echo "$DATE_CHANGED"fi
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表