]> git.ozlabs.org Git - next-scripts/blob - make_tree_file
allow for optional building after merging a tree
[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 echo 'Name              SHA1
18 ----            ----' > Next/SHA1s
19
20 IFS='   '
21 while read email type name url ref build; do
22         [[ "$email" =~ '^#.*$' ]] && continue
23         tab="\t"
24         [ $(echo "$name" | wc -c) -le 8 ] && tab="\t\t"
25         [ "$type" = "git" ] && url="$url#$ref"
26         printf "%s$tab%s\t%s\n" $name $type $url
27         href="$name/$ref"
28         [ "$type" = "quilt" ] && href="quilt/$name"
29         printf "%s$tab%s\n" $name $(git rev-parse --verify $href) >> Next/SHA1s
30 done <../real_control >>Next/Trees
31
32 cp ../quilt-import.log ../merge.log Next/.
33
34 # This means I get the right tag if I finish after midnight
35 d=$(date --date "5 hours ago" '+%Y%m%d')
36
37 printf "%s-next-%s\n" "" $d >localversion-next
38
39 git add Next localversion-next
40 git commit -s -v -a -m "Add linux-next specific files for $d"
41 git tag "next-$d"
42 git update-ref refs/heads/stable refs/remotes/origin/master
43
44 # Stitch the new tree into the history branch
45 new_ref=$(echo "next-$d" | git commit-tree 'HEAD^{tree}' -p history -p HEAD)
46 git update-ref -m "next-$d" refs/heads/history $new_ref
47
48 l=$(git describe --match "v*" --abbrev=0)
49 l=${l#v}
50 cat >../abat-script-$d <<EOF
51 option title linux-next $d boot test
52 class power5 type="IBM,9124-720 eServer OpenPower 720"
53 class power5plus type="IBM,9110-51A System p5 510"
54 +\$kernel "HEAD^"
55 +\$config http://ozlabs.au.ibm.com/~tony/abat/configs/no_CONFIG_LOCALVERSION_AUTO.config
56 build generic git  git://fs.ozlabs.ibm.com/home/kernel/linux-next.git \$kernel -c \$config -m -j\$num_cpus
57 boot initcall_debug
58 EOF
59
60 exit 0