This way bodhi should be able to link the update to the bug automatically. The bug number is moved from the git commit title to the body. We don't really need this clutter in the git log, it is only useful in the %changelog so that bodhi can pick it up. [skip changelog]
42 lines
985 B
Bash
Executable file
42 lines
985 B
Bash
Executable file
#!/bin/bash
|
|
|
|
LANG=C.utf8
|
|
set -ex
|
|
set -o pipefail
|
|
|
|
version="$1"
|
|
bug="$2"
|
|
args="$3"
|
|
ts="$(date '+%a %b %d %Y') $(git config user.name) <$(git config user.email)>"
|
|
|
|
kinit -R "${FAS:-zbyszek}@FEDORAPROJECT.ORG"
|
|
|
|
sed -i -r "s/(^Version: *) .+/\1 $version/" *.spec
|
|
spectool -g *.spec
|
|
: >sources
|
|
fedpkg local
|
|
spectool -l -S *.spec | awk '{print $2}' | sed s:.*/:: | xargs fedpkg new-sources
|
|
|
|
if [ -d "archlinux-keyring" ]; then
|
|
(cd archlinux-keyring && git pull)
|
|
else
|
|
git clone https://gitlab.archlinux.org/archlinux/archlinux-keyring/
|
|
fi
|
|
GIT_DIR=archlinux-keyring/.git git tag --verify "$version"
|
|
|
|
sum1=$(GIT_DIR=archlinux-keyring/.git git archive --prefix=archlinux-keyring-$version/ "$version" | sha512sum -)
|
|
sum2=$(zcat archlinux-keyring-$version.tar.gz | sha512sum -)
|
|
if [ "$sum1" != "$sum2" ]; then
|
|
echo "Checksums don't match!"
|
|
exit 1
|
|
fi
|
|
|
|
git add *.spec
|
|
git commit -a -m "Version $version
|
|
|
|
... (rhbz#$bug)"
|
|
|
|
if [ "$args" = "-u" ]; then
|
|
git push
|
|
fedpkg build
|
|
fi
|