#!/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 } # This means I get the right tag if I finish after midnight d=$(date --date "5 hours ago" '+%Y%m%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" [ "$type" = "git" ] && url="$url#$ref" printf "%s$tab%s\t%s\n" $name $type $url href="$name/$ref" [ "$type" = "quilt" ] && href="quilt/$name" printf "%s$tab%s\n" $name $(git rev-parse --verify "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 "next-$d" git update-ref refs/heads/stable refs/remotes/origin/master # Stitch the new tree into the history branch new_ref=$(echo "next-$d" | git commit-tree 'HEAD^{tree}' -p history -p HEAD) git update-ref -m "next-$d" refs/heads/history $new_ref ../tools/make_abat_scripts "$d" exit 0