-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpkg-sync-common-files
executable file
·47 lines (39 loc) · 1.26 KB
/
pkg-sync-common-files
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
#!/bin/bash
#
# Update common files such as .launchpad.yaml and gbp.conf for the
# specified package.
#
# Example: pkg-sync-common-files cinder master caracal
# Example: pkg-sync-common-files cinder stable/2023.2 bobcat
#
set -ex
if [ $# -ne 3 ]; then
echo "Usage: $0 package-name branch-name openstack-codename"
echo " $0 cinder master bobcat"
echo " $0 cinder stable/antelope antelope"
exit
fi
package_name=$1
branch_name=$2
openstack_codename=$3
if [ ! -d ./cloud-archive-tools ]; then
git clone lp:~ubuntu-cloud-archive/+git/cloud-archive-tools
else
cd cloud-archive-tools
git pull
cd -
fi
git clone lp:~ubuntu-openstack-dev/ubuntu/+source/${package_name} || true
cd ${package_name}
git checkout ${branch_name}
cp ../cloud-archive-tools/cloud_global/${openstack_codename}/.launchpad.yaml .
git add .launchpad.yaml
cp ../cloud-archive-tools/cloud_global/${openstack_codename}/gbp.conf ./debian/
git add ./debian/gbp.conf
if [[ "stable/bobcat" =~ "stable" ]]; then
dch "d/gbp.conf, .launchpad.yaml: Sync from cloud-archive-tools for ${openstack_codename}."
else
dch -n "d/gbp.conf, .launchpad.yaml: Sync from cloud-archive-tools for ${openstack_codename}."
fi
sed -i "/ \* Non-maintainer upload./d" "debian/changelog"
debcommit -a