diff options
author | Sam James <sam@gentoo.org> | 2022-11-01 22:44:27 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-11-01 22:44:27 +0000 |
commit | e5323d2232b5b24d7481c5175777f15e9b2e68cd (patch) | |
tree | 7fbd9b76f1799ac59d1febbe8d7a9dd5bdc3cee7 | |
parent | drop gpy-py2 handling (diff) | |
download | qa-scripts-e5323d2232b5b24d7481c5175777f15e9b2e68cd.tar.gz qa-scripts-e5323d2232b5b24d7481c5175777f15e9b2e68cd.tar.bz2 qa-scripts-e5323d2232b5b24d7481c5175777f15e9b2e68cd.zip |
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@gentoo.org>
-rwxr-xr-x | keyrings-export.bash | 7 |
1 files changed, 6 insertions, 1 deletions
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 |