Add example detection script

This commit is contained in:
lawrencegripper
2025-01-14 12:13:15 +00:00
parent 7a88cb1d8b
commit c15fb5f6b2
3 changed files with 43 additions and 3 deletions

30
helpers/pinned-details-chech.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
toolset_files=$(find . -name 'toolset-*.json')
for toolset_file in $toolset_files; do
if [[ "$toolset_file" == *"toolset-schema.json" ]]; then
continue
fi
readarray -t pinned_details < <(jq --compact-output '.. | objects | select(has("review-at"))' "$toolset_file")
for pinned_detail in "${pinned_details[@]}"; do
review_date=$(jq -r '.["review-at"]' <<< "$pinned_detail")
reason=$(jq -r '.["reason"]' <<< "$pinned_detail")
if [ -n "$review_date" ]; then
if [ "$(date -d "$review_date" +%s)" -gt "$(date +%s)" ]; then
echo "ERROR: Overdue review date: $review_date for tool in $toolset_file"
echo " Pinned for '$reason'"
echo ""
fi
if [ "$(date -d "$review_date" +%s)" -le $(( $(date +%s) - 7*24*60*60 )) ]; then
echo "WARNING: Review date is coming up within the next 7 days: $review_date for tool in $toolset_file"
echo " Pinned for '$reason'"
echo ""
fi
fi
done
done

View File

@@ -470,13 +470,23 @@
}, },
"postgresql": { "postgresql": {
"version": "14.12.1", "version": "14.12.1",
"signature": "698BA51AA27CC31282AACA5055E4B9190BC6C0E9" "signature": "698BA51AA27CC31282AACA5055E4B9190BC6C0E9",
"pinnedDetails": {
"link": "https://github.com/EnterpriseDB/edb-installers/issues/196#issuecomment-2489021239",
"reason": "this was pinned due to a downstream issue with the installer",
"review-at": "2023-12-31"
}
}, },
"kotlin": { "kotlin": {
"version": "latest" "version": "latest"
}, },
"openssl": { "openssl": {
"version": "1.1.1" "version": "1.1.1",
"pinnedDetails": {
"link": "https://github.com/somelink",
"reason": "this was pinned due to a downstream issue with the installer",
"review-at": "2025-01-30"
}
}, },
"pwsh": { "pwsh": {
"version": "7.4" "version": "7.4"

View File

@@ -17,7 +17,7 @@
}, },
"then": { "then": {
"required": [ "required": [
"pinnedReason" "pinnedDetails"
], ],
"properties": { "properties": {
"pinnedDetails": { "pinnedDetails": {