commit: e5323d2232b5b24d7481c5175777f15e9b2e68cd
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 1 22:44:27 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Nov 1 22:44:27 2022 +0000
URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=e5323d22
keyrings-export.bash: use "last monday" / fix timestamped files generation
Don't generate the timestamped files on Mondays to avoid "last" / "next"
Monday confusion
We want to avoid generating stuff like all-devs-20221107.gpg.
Signed-off-by: Sam James <sam <AT> gentoo.org>
keyrings-export.bash | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/keyrings-export.bash b/keyrings-export.bash
index 35c9959..b3234e2 100755
--- a/keyrings-export.bash
+++ b/keyrings-export.bash
@@ -51,7 +51,12 @@ for key in service-keys committing-devs active-devs
infra-devs retired-devs all-
ln -s "${OUTPUT_DIR}"/keys/${key}.gpg "${OUTPUT_DIR}"/${key}.gpg
fi
- timestamp=$(date -u +%Y%m%d-%A -d "monday")
+ if [[ $(date -u +%A) == Monday ]] ; then
+ # We don't want to run on Mondays to avoid last/next week
confusion
+ break
+ fi
+
+ timestamp=$(date -u +%Y%m%d-%A -d "last monday")
if [[ ${timestamp} != *-Monday ]] ; then
break