"--date:unix" -> "--date=format-local:%s"

- "--date:unix" was introduced in Git 2.9.4, while
  "--date=format-local:..." appeared in 2.7.0
This commit is contained in:
Ștefan Talpalaru 2020-04-30 16:55:13 +02:00
parent e8e1f1c2cf
commit c8278c4ca4
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
2 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ nim_needs_rebuilding() {
fi
# compare the built commit's timestamp to the date of the last commit (keep in mind that Git doesn't preserve file timestamps)
if [[ -e "${NIM_DIR}/bin/timestamp" && $(cat "${NIM_DIR}/bin/timestamp") -eq $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then
if [[ -e "${NIM_DIR}/bin/timestamp" && $(cat "${NIM_DIR}/bin/timestamp") -eq $(cd "$NIM_DIR"; git log --pretty=format:%cd -n 1 --date=format-local:%s) ]]; then
return $NO_REBUILD
else
return $REBUILD
@ -125,7 +125,7 @@ build_nim() {
rm build_all_custom.sh
# record the last commit's timestamp
git log --pretty=format:%cd -n 1 --date=unix > bin/timestamp
git log --pretty=format:%cd -n 1 --date=format-local:%s > bin/timestamp
# update the CI cache
popd # we were in $NIM_DIR

View File

@ -54,7 +54,7 @@ target_needs_rebuilding() {
fi
# compare binary mtime to the date of the last commit (keep in mind that Git doesn't preserve file timestamps)
if [[ -e "$TARGET_BINARY" && $(stat $STAT_FORMAT "$TARGET_BINARY") -gt $(cd "$SUBREPO_DIR"; git log --pretty=format:%cd -n 1 --date=unix) ]]; then
if [[ -e "$TARGET_BINARY" && $(stat $STAT_FORMAT "$TARGET_BINARY") -gt $(cd "$SUBREPO_DIR"; git log --pretty=format:%cd -n 1 --date=format-local:%s) ]]; then
return $NO_REBUILD
else
return $REBUILD