2f50aa1
#!/bin/sh
2f50aa1
# Generate a commit for a rawhide RC release
2f50aa1
2f50aa1
source scripts/kernel-version.sh
2f50aa1
2f50aa1
make release
2f50aa1
# fixup the release because rpmdev-bumpspec *sigh*
2f50aa1
scripts/fixup-bumpspec.sh
2f50aa1
fedpkg commit -c
2f50aa1
2f50aa1
# Figure out what is our RC
2f50aa1
RC=`grep kernel.spec "%define rcrev" | cut -d ' ' -f 3`
2f50aa1
RC=$(($RC+1))
2f50aa1
2f50aa1
# Kill all patches
2f50aa1
awk '!/patch/ { print $0 }' < sources > sources.tmp
2f50aa1
mv sources.tmp sources
2f50aa1
2f50aa1
# Grab the tarball
2f50aa1
# FILL this in laura
2f50aa1
2f50aa1
# bump rcrev in the spec and set git snapshot to 0
2f50aa1
2f50aa1
perl -p -i -e 's|%define rcrev.*|%global rcrev $ENV{'RC'}|' kernel.spec
2f50aa1
2f50aa1
perl -p -i -e 's|%define gitrev.*|%define gitrev 0|' kernel.spec