aboutsummaryrefslogtreecommitdiff
path: root/debian.linaro/ci/scripts/cisync
blob: 993728bbda92cf2224707c7cfb879e50c009344f (plain)
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
#!/bin/bash
set -x
set -e

. debian/debian.env

git clean -d -f -x
git reset --hard HEAD
fakeroot debian/rules clean

commit_msg="sync with $(git log --oneline -1)"
prev_revision=$(fakeroot debian/rules printenv \
	| grep ^prev_revision[^s] \
	| awk '{print $3}')

dch -i -c $DEBIAN/changelog $commit_msg
sed -i -e "1 s/~.*ubuntu1//" $DEBIAN/changelog

release=$(fakeroot debian/rules printenv | grep ^release | awk '{print $3}')
ci_revision=$(fakeroot debian/rules printenv | grep ^prev_revision[^s] | awk '{print $3}')
revision=$(fakeroot debian/rules printenv | grep ^revision[^s] | awk '{print $3}')
abiname=$(echo $revision | awk -F. '{print $1}')

./debian/scripts/misc/getabis $release $ci_revision

git rm -r $DEBIAN/abi/$release-$prev_revision

git add $DEBIAN/abi/$release-$ci_revision
git add $DEBIAN/changelog

git commit -s -m "LINARO: $commit_msg"

exit 0