github/list_old_branches.sh: use 120 days by default

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2021-06-10 10:16:56 +02:00
parent 3fb92592a2
commit a3d5545fd9
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
1 changed files with 5 additions and 1 deletions

View File

@ -7,7 +7,11 @@ function getCommitUnix() {
git show --no-patch --no-notes --pretty='%at' ${1}
}
OLDER_THAN_DAYS="90"
OLDER_THAN_DAYS="120"
if [[ ! -z "${1}" ]]; then
OLDER_THAN_DAYS="${1}"
fi
CURRENT_TIME=$(date +%s)
OLDER_THAN_UNIX=$(( ${OLDER_THAN_DAYS} * 86400 ))
OLDER_THAN=$(( ${CURRENT_TIME} - ${OLDER_THAN_UNIX} ))