Skip to content

Commit c15fb5f

Browse files
Add example detection script
1 parent 7a88cb1 commit c15fb5f

File tree

3 files changed

+43
-3
lines changed

3 files changed

+43
-3
lines changed

helpers/pinned-details-chech.sh

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
toolset_files=$(find . -name 'toolset-*.json')
4+
5+
for toolset_file in $toolset_files; do
6+
if [[ "$toolset_file" == *"toolset-schema.json" ]]; then
7+
continue
8+
fi
9+
10+
readarray -t pinned_details < <(jq --compact-output '.. | objects | select(has("review-at"))' "$toolset_file")
11+
12+
for pinned_detail in "${pinned_details[@]}"; do
13+
review_date=$(jq -r '.["review-at"]' <<< "$pinned_detail")
14+
reason=$(jq -r '.["reason"]' <<< "$pinned_detail")
15+
16+
if [ -n "$review_date" ]; then
17+
if [ "$(date -d "$review_date" +%s)" -gt "$(date +%s)" ]; then
18+
echo "ERROR: Overdue review date: $review_date for tool in $toolset_file"
19+
echo " Pinned for '$reason'"
20+
echo ""
21+
fi
22+
23+
if [ "$(date -d "$review_date" +%s)" -le $(( $(date +%s) - 7*24*60*60 )) ]; then
24+
echo "WARNING: Review date is coming up within the next 7 days: $review_date for tool in $toolset_file"
25+
echo " Pinned for '$reason'"
26+
echo ""
27+
fi
28+
fi
29+
done
30+
done

images/windows/toolsets/toolset-2019.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -470,13 +470,23 @@
470470
},
471471
"postgresql": {
472472
"version": "14.12.1",
473-
"signature": "698BA51AA27CC31282AACA5055E4B9190BC6C0E9"
473+
"signature": "698BA51AA27CC31282AACA5055E4B9190BC6C0E9",
474+
"pinnedDetails": {
475+
"link": "https://github.com/EnterpriseDB/edb-installers/issues/196#issuecomment-2489021239",
476+
"reason": "this was pinned due to a downstream issue with the installer",
477+
"review-at": "2023-12-31"
478+
}
474479
},
475480
"kotlin": {
476481
"version": "latest"
477482
},
478483
"openssl": {
479-
"version": "1.1.1"
484+
"version": "1.1.1",
485+
"pinnedDetails": {
486+
"link": "https://github.com/somelink",
487+
"reason": "this was pinned due to a downstream issue with the installer",
488+
"review-at": "2025-01-30"
489+
}
480490
},
481491
"pwsh": {
482492
"version": "7.4"

schemas/toolset-schema.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"then": {
1919
"required": [
20-
"pinnedReason"
20+
"pinnedDetails"
2121
],
2222
"properties": {
2323
"pinnedDetails": {

0 commit comments

Comments
 (0)