Skip to content

Commit bb9d773

Browse files
authored
Prevent packages in the future from making it into the repo (#1159)
1 parent e20fee3 commit bb9d773

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/check.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,12 @@ for rev in $(git rev-list --reverse HEAD); do
5151
latest_timestamp=${latest_timestamp:-$highest}
5252
fi
5353
done
54+
55+
curr_date=$("$DATE" +"%Y-%m-%dT%H:%M:%SZ" -u)
56+
a=$(convert_timestamp_to_unix_time "$curr_date")
57+
b=$(convert_timestamp_to_unix_time "$highest")
58+
if [[ $a -le $b ]]; then
59+
echo "ERROR: The latest timestamp $highest is beyond the current time $curr_date."
60+
echo "Please use the script \`./scripts/add-from-github.sh\` or \`./scripts/add-revision.sh\` to automatically set the timestamp to an appropriate value when you add a package"
61+
exit 1
62+
fi

0 commit comments

Comments
 (0)