Skip to content

Commit

Permalink
cleanup unused signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
robstoll committed Apr 1, 2024
1 parent 6da8809 commit e2bb501
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/cleanup-on-push-to-main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,19 @@ function cleanupOnPushToMain() {
"$file" || return $?
done || die "could not replace the install instructions"

find "$projectDir" \
-type f \
-name "*.sig" \
-not -path "$projectDir/.gt/signing-key.public.asc.sig" \
-not -path "$projectDir/.gt/remotes/*/public-keys/*.sig" \
-print0 |
while read -r -d $'\0' sigFile; do
if ! [[ -f ${sigFile::${#sigFile}-4} ]]; then
logInfo "remove unused signature \033[0;36m%s\033[0m as the corresponding file does no longer exist" "$sigFile"
rm "$sigFile"
fi
done

logSuccess "Cleanup on push to main completed"
}

Expand Down

0 comments on commit e2bb501

Please sign in to comment.