47c684d28a32244c23adee1c620fdb05e8958cd9
[ric-plt/lib/rmr.git] / doc / src / rtd / fmt_changes.ksh
1 # vim: ts=4 noet sw=4:
2 #==================================================================================
3 #       Copyright (c) 2019 Nokia
4 #       Copyright (c) 2018-2019 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:       fmt_changes.ksh
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 .im setup.im
26 &h1(RMR Release Notes)
27 The following is a list of release highlights for the core RMR library and 
28 wrappers which are housed in the same repository.
29 These are extracted directly from the CHANGES_*.txt files at the repo root; 
30 please refer to those files for a completely up to date listing of
31 API changes (as generated documents may lag).  
32 &space
33
34 The RMR repo houses two distinct release entities: the core RMR package
35 and the python wrapper package.
36 To avoid naming conflicts (tags mostly) The core package uses odd 
37 major version numbers (e.g. 3.2.1) and the wrapper package uses even
38 major version numbers. 
39 The release notes are split into two sections; please be sure to 
40 scroll to the section that is appropriate.
41
42 endKat
43
44 for x in ../../../CHANGES*.txt
45 do
46         case $x in 
47                 *CORE*) printf "&h2(Core RMR Changes)\n" ;;
48                 *)      printf "&h2(Wrapper Changes)\n" ;;
49         esac
50
51         sed 's/^/!/' $x | awk ' 
52                 print_raw && /^!$/ { 
53                         printf( "&space\n\n" ); 
54                         next 
55                 } 
56         
57                 { gsub ( "!", "", $1 ) }
58         
59                 $1 + 0 >= 2019 {
60                         print_raw = 1
61                         printf( "&h3(%s)\n", $0 )
62                         next 
63                 }
64         
65                 print_raw { print } 
66                 ' ###
67 done