diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2021-03-09 19:29:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-03-10 11:21:50 +0100 |
commit | 69959235c3094b811406f734e863a63fc61046c0 (patch) | |
tree | c6b90530a2e3926d5113c25a8d4f4ebe6fb8de66 /logerrit | |
parent | 67411b19665279bacb45cbe50788cac0fa270074 (diff) |
adapt recent change to macOS
... from
commit e7a471a8fbac22877973af7e7be8c6a0701b4046
logerrit: do not submit if parent is older than a week
Change-Id: Icd1ee7f66dbbcef90add9e4ddecfdb9bbc0900e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112234
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'logerrit')
-rwxr-xr-x | logerrit | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -24,7 +24,11 @@ submit() { fi if [ "$BRANCH" = "master" ]; then - WEEKOLDDATE=$(date --date="7 days ago" +%s) + if [ "$unamestr" = 'Linux' ]; then + WEEKOLDDATE=$(date --date="7 days ago" +%s) + else + WEEKOLDDATE=$(date -v7d +%s) # BSD equivalent + fi PARENTDATE=$(git show -s --format=%ct HEAD~1) if [[ $PARENTDATE -lt $WEEKOLDDATE ]]; then echo "Your branch is older than a week, do './g pull -r' and retry" |