forked from opensciencegrid/release-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1-verify-prerelease
executable file
·48 lines (38 loc) · 1.75 KB
/
1-verify-prerelease
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# Compare the list of packages in pre-release for against the release
# list put together by the OSG Release Coordinator
. release-common.sh
if [[ `git log -1 --format=%cd --date=relative release-list | xargs -I {} date -d {} +%s` \
-lt `date -d '8 days ago' +%s` ]]; then
die "release-list older than 8 days. Run 'git pull'. If the issue persists, contact the release manager."
fi
final_msg=""
for ver in ${versions[@]}; do
branch=$(osg_release $ver)
read -ra dvers <<< $(osg_dvers $ver) # create array of dvers
for dver in ${dvers[@]}; do
tag_prefix=osg-$branch-$dver
prerel_tag=$tag_prefix-prerelease
# Get lists of packages from release list and compare them to what's currently in prerelease
osg-koji list-tagged --quiet $prerel_tag | awk '{print $1}' | sort > prerelease
pkgs_to_release $branch $dver | sort > slated
missing_pkgs=$(comm -23 slated prerelease)
extra_pkgs=$(comm -13 slated prerelease)
# Print any slated packages missing from pre-release
if [[ -n $missing_pkgs ]]; then
final_msg=$(printf "%s\n\n$(print_header "Slated packages missing from $prerel_tag")\n%s" \
"$final_msg" "$missing_pkgs")
fi
# Print any packages in pre-release that are not slated for release
if [[ -n $extra_pkgs ]]; then
final_msg=$(printf "%s\n\n$(print_header "Packages in $prerel_tag not slated for release")\n%s" \
"$final_msg" "$extra_pkgs")
fi
done
done
if [[ -z $final_msg ]]; then
print_header "Pre-release matches the slated package list. Please continue with the rest of the release process."
else
echo "$final_msg" | tail -n +3
fi
rm prerelease slated