]> git.evergreen-ils.org Git - working/Evergreen.git/blob - docs/RELEASE_NOTES_NEXT/create_release_notes.sh
LP1615805 No inputs after submit in patron search (AngularJS)
[working/Evergreen.git] / docs / RELEASE_NOTES_NEXT / create_release_notes.sh
1 #!/bin/bash
2
3 ver=
4 while getopts r: opt; do
5   case $opt in
6   r)
7       ver=$OPTARG
8       ;;
9   esac
10 done
11
12 if [ -z "$ver" ]; then echo "I need a version: -r"; exit; fi
13
14 outfile="../RELEASE_NOTES_$ver.adoc"
15
16 title="= Evergreen $ver Release Notes ="
17
18 echo $title > $outfile;
19 echo ':toc:' >> $outfile
20 echo ':numbered:' >> $outfile
21 echo ':toclevels: 3' >> $outfile
22 echo >> $outfile
23 echo '== Upgrade notes ==' >> $outfile
24 echo >> $outfile
25
26 echo '== New Features ==' >> $outfile
27 echo >> $outfile
28
29 echo ':leveloffset: +2' >> $outfile
30
31 for i in `ls -l|grep ^d|awk '{print $9}'`; do
32     files=$(ls $i/*{txt,adoc} 2>/dev/null)
33     if [ "_$files" != "_" ]; then
34         echo >> $outfile
35         echo >> $outfile
36         echo "= $i =" >> $outfile
37         echo >> $outfile
38
39         for j in $files; do
40             echo >> $outfile
41             cat $j >> $outfile
42             echo >> $outfile
43         done
44     fi
45 done
46
47 files=$(ls *{txt,adoc} 2>/dev/null | grep -v 'RELEASE_NOTE_TEMPLATE.adoc')
48 if [ "_$files" != "_" ]; then
49     echo >> $outfile
50     echo '= Miscellaneous =' >> $outfile
51     echo >> $outfile
52     for j in $files; do
53         cat $j >> $outfile
54     done
55 fi
56
57 echo >> $outfile
58 echo ':leveloffset: 0' >> $outfile
59 echo >> $outfile
60
61 if [ -f _acknowledgments ]; then
62     echo >> $outfile
63     echo "== Acknowledgments ==" >> $outfile
64     cat _acknowledgments >> $outfile
65     echo >> $outfile
66 fi