eb3b99bc6d7607973efb009b835415f5dd0ea838
[ric-plt/xapp-frame-cpp.git] / doc / src / rtd / gen_rel_notes.sh
1 # vim: ts=4 noet sw=4:
2 #==================================================================================
3 #       Copyright (c) 2019-2020 Nokia
4 #       Copyright (c) 2018-2020 AT&T Intellectual Property.
5 #
6 #   Licensed under the Apache License, Version 2.0 (the "License");
7 #   you may not use this file except in compliance with the License.
8 #   You may obtain a copy of the License at
9 #
10 #       http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #   Unless required by applicable law or agreed to in writing, software
13 #   distributed under the License is distributed on an "AS IS" BASIS,
14 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #   See the License for the specific language governing permissions and
16 #   limitations under the License.
17 #==================================================================================
18
19 #       Mnemonic:       gen_rel_notes.sh
20 #       Abstract:       This script looks for CHANGES*.txt files at the top level
21 #                               and builds one {X}fm source file from which the release notes
22 #                               RTD file is created.
23
24 cat <<endKat
25
26 .** ------------------------------------------------------------------------
27 .** CAUTION: This .xfm file is automatically generated by fmt_changes.ksh
28 .**          do NOT edit. Use 'make rel-notes.xfm' to regenerate.
29 .** ------------------------------------------------------------------------
30
31 .dv GEN_TITLE 1
32 .dv doc_title Release Notes
33
34 .im setup.im
35 .dh 1 u=off
36
37 &h1(C++ Framework Release Notes)
38 The following is a list of release highlights for the C++ xAPP Framework.
39
40 endKat
41
42 for x in ../../../CHANGES*
43 do
44         awk '
45                 /^#/ { next }           # ditch all comments
46
47                 # tag project releases by matching release tag associated
48                 /1\.0\.0$/  { printf( "&h1(Bronze Release)\n" ) }
49
50                 print_raw && /^$/ {                             # include blank lines after first real stuff
51                         printf( "&space\n\n" );
52                         next
53                 }
54
55                 $1+0 >= 2019 {
56                         print_raw = 1                           # safe to print blank lines
57                         printf( "&h2(%s)\n", $0 )
58                         next
59                 }
60
61                 print_raw { print }
62         ' $x
63 done