]> git.ozlabs.org Git - next-scripts/blob - make_tree_file
various updates
[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 #git update-ref refs/heads/akpm-end refs/heads/master
11
12 # This means I get the right tag if I finish after midnight
13 d=$(date --date "5 hours ago" '+%Y%m%d')
14 l="$(git describe --match "v*" --abbrev=0)"
15 n="next-$d"
16
17 mkdir Next
18
19 echo 'Trees included into this release:
20
21 Name            Type    URL
22 ----            ----    ---' > Next/Trees
23
24 echo 'Name              SHA1
25 ----            ----' > Next/SHA1s
26
27 IFS='   '
28 while read email type name url ref build; do
29         [[ "$email" =~ '^#.*$' ]] && continue
30         tab="\t"
31         [ $(echo "$name" | wc -c) -le 8 ] && tab="\t\t"
32         [ "${ref%:*}" = "${ref}" ] || ref=${ref##*:}
33         [ "$type" = "git" ] && url="$url#$ref"
34         printf "%s$tab%s\t%s\n" $name $type $url
35         printf "%s$tab%s\n" $name $(git show-ref --verify --hash "refs/next/$d/$name") >> Next/SHA1s
36 done <../real_control >>Next/Trees
37
38 for i in quilt-import.log merge.log; do
39         grep -v '^Checking out files:' ../$i >Next/$i
40 done
41
42 printf -- "-next-%s\n" $d >localversion-next
43
44 git add Next localversion-next
45 git commit -s -v -a -m "Add linux-next specific files for $d"
46 git tag -u 41D5C07A -m "$n" "$n"
47
48 git update-ref refs/heads/stable refs/remotes/origin/master
49 git update-ref refs/heads/akpm-start refs/remotes/origin/master
50
51 p="patch-$l-$n"
52 git diff-tree -p "$l.." >"../$p"
53 gpg2 -u 41D5C07A -a -b "../$p"
54 #echo "$l" > "../LATEST-IS-$n"
55
56 ../tools/make_abat_scripts "$d" "$l"
57
58 echo Pushing to korg ...
59 git push korg
60
61 echo Pushing to korg-history ...
62 git push korg-history
63
64 echo Pushing to history
65 git push history
66
67 echo Pushing patch to kernel.org ...
68 cd ..
69 xz -v -9 "$p"
70 kup --host=geb.kernel.org put "$p.xz" "$p.asc" "/pub/linux/kernel/next/$p.gz"
71
72 exit 0