From 00c36afad2296092106653f2dea4c290ebe37bfc Mon Sep 17 00:00:00 2001 From: umorigu Date: Wed, 11 Jun 2014 01:39:36 +0900 Subject: [PATCH] Keep the file timesamp of commit time --- release.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/release.sh b/release.sh index 968a8cb..8ddc489 100755 --- a/release.sh +++ b/release.sh @@ -205,6 +205,15 @@ if [ "$__git" ] ; then cd $pkg_dir echo git reset --hard "$tag" git reset --hard "$tag" + + # Set file timestamp + for FILE in $(git ls-files); do + TIME=$(git log --pretty=format:%ci -n1 $FILE) + echo $TIME'\t'$FILE + STAMP=$(date -d "$TIME" +"%y%m%d%H%M.%S") + touch -t $STAMP $FILE + done + cd .. else exit -- 2.11.0