summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-03-09 19:29:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-10 11:21:50 +0100
commit69959235c3094b811406f734e863a63fc61046c0 (patch)
treec6b90530a2e3926d5113c25a8d4f4ebe6fb8de66
parent67411b19665279bacb45cbe50788cac0fa270074 (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>
-rwxr-xr-xlogerrit6
1 files changed, 5 insertions, 1 deletions
diff --git a/logerrit b/logerrit
index bae806a5939e..fc30f918c17c 100755
--- a/logerrit
+++ b/logerrit
@@ -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"