-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path2-push-release
executable file
·58 lines (45 loc) · 1.81 KB
/
2-push-release
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
52
53
54
55
56
57
58
#!/bin/bash
# Unlock the release repos and move the pre-release packages into them.
# Create a version-specific release tag (for non-data-only releases)
# Lock the release repos
. release-common.sh
check_for_osg_koji
detect_rescue_file
for branch in ${versions[@]}; do
if [[ $branch = 3.*-upcoming ]]; then
ver=${ver%-upcoming}
fi
read -ra dvers <<< $(osg_dvers $branch) # create array of dvers
for dver in ${dvers[@]}; do
prerelease_repo=osg-$branch-$dver-prerelease
release_repo=osg-$branch-$dver-release
# Push from pre-release to release
print_header "Unlocking $release_repo"
run_cmd "osg-koji edit-tag --unlock $release_repo"
echo
print_header "Moving packages from $prerelease_repo to $release_repo"
pkgs_to_release $branch $dver > move-to-$branch-release-$dver
if [ -s move-to-$branch-release-$dver ]; then
run_cmd "xargs --arg-file move-to-$branch-release-$dver osg-koji move-pkg $prerelease_repo $release_repo"
fi
echo
if [ $DATA -eq 0 ]; then
# Create new release repo for non-$data releases
versioned_release_repo=osg-$branch-$dver-release-$(ver_tag $branch)
print_header "Cloning $release_repo to $versioned_release_repo"
run_cmd "osg-koji clone-tag --all $release_repo $versioned_release_repo"
echo
fi
# Lock repos (data-only releases leave the versioned repos untouched
# for historical integrity)
for repo in $release_repo $versioned_release_repo; do
print_header "Locking $repo"
run_cmd "osg-koji edit-tag --lock $repo"
echo
done
done
done
# Don't remove rescue files if user is troubleshooting
if [ $DRY_RUN -eq 0 ]; then
cleanup_on_success
fi