-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path0-generate-pkg-list
executable file
·51 lines (41 loc) · 1.38 KB
/
0-generate-pkg-list
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
49
50
51
#!/bin/bash
# This script promotes osg-version to testing and generates a preliminary list of packages for the release manager
. release-common.sh
# make sure osg-koji is available before starting
check_for_osg_koji
release_tools="osg-pkgs-behind-tag"
for i in $release_tools
do
check_for_and_add_command $i
if [[ $? -ne 0 ]];
then
echo "Release tool ($i) not present in PATH"
exit 1
fi
done
detect_rescue_file
# #############################
# # Generate list of packages #
# #############################
for branch in ${versions[@]}; do
read -ra dvers <<< $(osg_dvers $branch) # create array of dvers
for dver in ${dvers[@]}; do
print_header_with_line "RPMs slated for release in osg-$branch-$dver-testing"
slated_cmd="koji-tag-diff osg-$branch-$dver-{testing,release}"
slated=$(eval $slated_cmd | tail -n +2)
if [[ $DRY_RUN -eq 1 ]]; then
echo $slated_cmd
else
echo "$slated"
fi
echo
slist=$(echo "$slated" | perl -lpe 's/(-[^-]+){2}$//' | tr '\n' ' ')
print_header_with_line "Slated packages in testing behind current development versions"
run_cmd "osg-pkgs-behind-tag osg-$branch-$dver-{testing,development} -- $slist"
echo
done
done
# Don't remove rescue files if user is troubleshooting
if [ $DRY_RUN -eq 0 ]; then
cleanup_on_success
fi