#!/bin/bash # Don't do releases in the wee hours :-) h=$(date '+%H') (( "$h" < 10 && "$h" > 4 )) && { echo "Go back to bed" 1>&2 exit 1 } eval $(ssh-agent -s) ssh-add ~/.ssh/ra.kernel.org # This means I get the right tag if I finish after midnight d=$(date --date "5 hours ago" '+%Y%m%d') l="$(git describe --match "v*" --abbrev=0)" n="next-$d" mkdir Next echo 'Trees included into this release: Name Type URL ---- ---- ---' > Next/Trees echo 'Name SHA1 ---- ----' > Next/SHA1s IFS=' ' while read email type name url ref build; do [[ "$email" =~ '^#.*$' ]] && continue tab="\t" [ $(echo "$name" | wc -c) -le 8 ] && tab="\t\t" [ "${ref%:*}" = "${ref}" ] || ref=${ref##*:} [ "$type" = "git" ] && url="$url#$ref" printf "%s$tab%s\t%s\n" $name $type $url printf "%s$tab%s\n" $name $(git show-ref --verify --hash "refs/next/$d/$name") >> Next/SHA1s done <../real_control >>Next/Trees for i in quilt-import.log merge.log; do grep -v '^Checking out files:' ../$i >Next/$i done printf -- "-next-%s\n" $d >localversion-next git add Next localversion-next git commit -s -v -a -m "Add linux-next specific files for $d" git tag -u 41D5C07A -m "$n" "$n" git update-ref refs/heads/stable refs/remotes/origin/master p="patch-$l-$n" git diff-tree -p "$l.." >"../$p" gpg2 -u 41D5C07A -a -b "../$p" #echo "$l" > "../LATEST-IS-$n" ../tools/make_abat_scripts "$d" "$l" echo Pushing to korg ... git push korg echo Pushing to korg-history ... git push korg-history echo Pushing to history git push history echo Pushing patch to kernel.org ... cd .. xz -v -9 "$p" kup --host=geb.kernel.org put "$p.xz" "$p.asc" "/pub/linux/kernel/next/$p.gz" ssh-agent -k exit 0