]> git.ozlabs.org Git - next-scripts/blob - make_tree_file
autogenerate an ABAT dat file
[next-scripts] / make_tree_file
1 #!/bin/bash
2
3 # Don't do releases in the wee hours :-)
4 h=$(date '+%H')
5 (( "$h" < 10 && "$h" > 4 )) && {
6         echo "Go back to bed" 1>&2
7         exit 1
8 }
9
10 mkdir Next
11
12 echo 'Trees included into this release:
13
14 Name            Type    URL
15 ----            ----    ---' > Next/Trees
16
17 IFS='   '
18 while read email type name url ref; do
19         [[ "$email" =~ '^#.*$' ]] && continue
20         tab="\t"
21         [ $(echo "$name" | wc -c) -le 8 ] && tab="\t\t"
22         [ "$type" = "git" ] && url="$url#$ref"
23         printf "%s$tab%s\t%s\n" $name $type $url
24 done <../real_control >>Next/Trees
25
26 cp ../quilt-import.log ../merge.log Next/.
27
28 # This means I get the right tag if I finish after midnight
29 d=$(date --date "5 hours ago" '+%Y%m%d')
30
31 printf "%s-next-%s\n" "" $d >localversion-next
32
33 git add Next localversion-next
34 git commit -s -v -a -m "Add linux-next specific files for $d"
35 git tag "next-$d"
36 git update-ref refs/heads/stable refs/remotes/origin/master
37
38 # Stitch the new tree into the history branch
39 new_ref=$(echo "next-$d" | git commit-tree 'HEAD^{tree}' -p history -p HEAD)
40 git update-ref -m "next-$d" refs/heads/history $new_ref
41
42 # Create a patch to remove the localversion-next file
43 cat >../nolocalversion-$d.patch <<EOF
44 diff --git a/localversion-next b/localversion-next
45 deleted file mode 100644
46 index d795256..0000000
47 --- a/localversion-next
48 +++ /dev/null
49 @@ -1 +0,0 @@
50 --next-$d
51 EOF
52
53 l=$(git describe --match "v*" --abbrev=0)
54 l=${l#v}
55 cat >../abat-script-$d <<EOF
56 option title linux-next $d boot test
57 class power5 type="IBM,9124-720 eServer OpenPower 720"
58 class power5plus type="IBM,9110-51A System p5 510"
59 class x8664 cpu_type="Intel(R) Xeon(TM) CPU 2.40GHz"
60 +\$kernel "$l"
61 +\$patch1 "http://www.kernel.org/pub/linux/kernel/people/sfr/linux-next/patch-v$l-next-$d.bz2"
62 +\$patch2 "http://fs.ozlabs.ibm.com/~sfr/nolocalversion-$d.patch"
63 build generic stock  \$kernel -p \$patch1 -p \$patch2 -m -j\$num_cpus
64 boot initcall_debug
65 EOF
66
67 exit 0