this repo has no description
1#!/usr/bin/perl
2#
3# Main authors:
4# Christian Schulte <schulte@gecode.org>
5#
6# Contributing authors:
7# Mikael Lagerkvist <lagerkvist@gecode.org>
8#
9# Copyright:
10# Christian Schulte, 2005
11# Mikael Lagerkvist, 2008
12#
13# This file is part of Gecode, the generic constraint
14# development environment:
15# http://www.gecode.org
16#
17# Permission is hereby granted, free of charge, to any person obtaining
18# a copy of this software and associated documentation files (the
19# "Software"), to deal in the Software without restriction, including
20# without limitation the rights to use, copy, modify, merge, publish,
21# distribute, sublicense, and/or sell copies of the Software, and to
22# permit persons to whom the Software is furnished to do so, subject to
23# the following conditions:
24#
25# The above copyright notice and this permission notice shall be
26# included in all copies or substantial portions of the Software.
27#
28# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35#
36#
37
38#
39# Compile changelog
40#
41
42$first = 1;
43$version = "";
44$moreinfocnt = 1;
45$info = "";
46
47$modclear{"kernel"} = "Kernel";
48$modclear{"search"} = "Search engines";
49$modclear{"int"} = "Finite domain integers";
50$modclear{"set"} = "Finite integer sets";
51$modclear{"float"} = "Floats";
52$modclear{"cpltset"} = "Finite integer sets with complete representation";
53$modclear{"minimodel"} = "Minimal modeling support";
54$modclear{"graph"} = "\%Graph constraints";
55$modclear{"scheduling"} = "Scheduling constraints";
56$modclear{"driver"} = "Script commandline driver";
57$modclear{"iter"} = "Range and value iterators";
58$modclear{"support"} = "Support algorithms and datastructures";
59$modclear{"example"} = "\%Example scripts";
60$modclear{"test"} = "Systematic tests";
61$modclear{"gist"} = "Gist";
62$modclear{"flatzinc"} = "Gecode/FlatZinc";
63$modclear{"other"} = "General";
64
65$whatclear{"bug"} = "Bug fixes";
66$whatclear{"performance"} = "Performance improvements";
67$whatclear{"documentation"} = "Documentation fixes";
68$whatclear{"new"} = "Additions";
69$whatclear{"removed"} = "Removals";
70$whatclear{"change"} = "Other changes";
71
72$rankclear{"minor"} = "minor";
73$rankclear{"major"} = "major";
74
75@modorder = ("kernel","search","int","set","float","cpltset","scheduling",
76 "graph","minimodel","driver",
77 "iter","support","example","test","gist","flatzinc","other");
78
79@whatorder = ("new","removed","change","bug","performance","documentation");
80
81foreach $mod (@modorder) {
82 $hastext{$mod} = 0;
83 foreach $what (@whatorder) {
84 $text{"$mod-$what"} = "";
85 }
86}
87
88$versions = "";
89$body = "";
90
91while ($l = <>) {
92 LINE:
93 next if ($l =~ /^\#/);
94 if ($l =~ /^\[RELEASE\]/) {
95 # Print previous
96 if (!$first) {
97 $sid = "SectionChanges_$version";
98 $sid =~ s|\.|_|g;
99 $versions = $versions . "\n - \\ref $sid \"Gecode $version ($date)\"";
100 $body = $body."\\section $sid Changes in Version $version ($date)\n\n";
101
102 $body = $body."$info\n\n";
103
104 foreach $mod (@modorder) {
105 if ($hastext{$mod}) {
106 $body = $body." - " . $modclear{$mod} . "\n";
107 $hastext{$mod} = 0;
108 foreach $what (@whatorder) {
109 if (!($text{"$mod-$what"} eq "")) {
110 $body = $body." - " . $whatclear{$what} . "\n";
111 $body = $body.$text{"$mod-$what"};
112 $text{"$mod-$what"} = "";
113 $body = $body." .\n";
114 }
115 }
116 $body = $body." .\n";
117 }
118 }
119 $body = $body."\n\n";
120 }
121 $first = 0;
122 $version = "";
123 $info = "";
124 $date = "";
125 while (($l = <>) && !($l =~ /\[DESCRIPTION\]/)) {
126 if ($l =~ /Version:[\t ]*(.*)$/) {
127 $version = $1;
128 } elsif ($l =~ /Date:[\t ]*(.*)$/) {
129 $date = $1;
130 }
131 }
132 while (($l = <>) && !($l =~ /\[ENTRY\]/)) {
133 $info = $info . $l;
134 }
135 goto LINE;
136 }
137 if ($l =~ /^\[ENTRY\]/) {
138 my $mod, $what, $rank, $bug, $issue, $desc, $more, $thanks, $author;
139 $desc = "";
140 $more = "";
141 $bug = "";
142 $issue = "";
143 $rank = "";
144 $what = "";
145 $mod = "";
146 $thanks = "";
147 $author = "";
148 while (($l = <>) && !($l =~ /\[DESCRIPTION\]/)) {
149 if ($l =~ /Module:[\t ]*(.*)$/) {
150 $mod = $1;
151 } elsif ($l =~ /What:[\t ]*(.*)$/) {
152 $what = $1;
153 } elsif ($l =~ /Rank:[\t ]*(.*)$/) {
154 $rank = $1;
155 } elsif ($l =~ /Bug:[\t ]*(.*)$/) {
156 $bug = $1;
157 } elsif ($l =~ /Issue:[\t ]*(.*)$/) {
158 $issue = $1;
159 } elsif ($l =~ /Thanks:[\t ]*(.*)$/) {
160 $thanks = $1;
161 } elsif ($l =~ /Author:[\t ]*(.*)$/) {
162 $author = $1;
163 }
164 }
165
166 while (($l = <>) &&
167 !(($l =~ /\[ENTRY\]/) || ($l =~ /\[RELEASE\]/) || ($l =~ /\[MORE\]/))) {
168 $desc = $desc . " " . $l;
169 }
170 $desc =~ s/^ //;
171 $desc =~ s/[ \t\n\r]*$//;
172 $desc =~ s/</\\</g;
173 $desc =~ s/>/\\>/g;
174 $desc =~ s/&/\\&/g;
175 $desc =~ s/\n([ \t]*)\n/\n\1<br>\n/g;
176 if ($l =~ /^\[MORE\]/) {
177 while (($l = <>) &&
178 !(($l =~ /\[ENTRY\]/) || ($l =~ /\[RELEASE\]/))) {
179 $more = $more . " " . $l;
180 }
181 }
182 $more =~ s/[ \t\n\r]*$//;
183 $more =~ s/</\\</g;
184 $more =~ s/>/\\>/g;
185 $more =~ s/</\\</g;
186 $more =~ s/&/\\&/g;
187 $more =~ s/\n([ \t]*)\n/\n\1<br>\n/g;
188 $hastext{$mod} = 1;
189 $rb = $rankclear{$rank};
190 if (!($issue eq "")) {
191 $rb = $rb . ", <a href=\"https://github.com/gecode/gecode/issues/$issue\">issue $issue</a>";
192 }
193 if (!($thanks eq "")) {
194 $rb = $rb . ", thanks to $thanks";
195 }
196 if (!($author eq "")) {
197 $rb = $rb . ", contributed by $author";
198 }
199 if (!($more eq "")) {
200 $more =~ s/^ //;
201 $more =~ s/[ \t\n\r]*$//;
202 $more =
203 " <span id=lesslink" . $moreinfocnt . " style=\"display: inline\">\n" .
204 " <a href=\"javascript:showInfo(" . $moreinfocnt . ", true)\">Details</a></span>\n" .
205 " <span id=morelink" . $moreinfocnt . " style=\"display: none\">\n" .
206 " <a href=\"javascript:showInfo(" . $moreinfocnt . ", false)\">Hide details</a></span>\n" .
207 " <div id=moreinfo" . $moreinfocnt . " style=\"display: none\">\n" .
208 " ". $more . "\n</div>\n";
209 $moreinfocnt = $moreinfocnt + 1;
210 }
211
212 $text{"$mod-$what"} =
213 ($text{"$mod-$what"} . " - $desc (" . $rb . ")\n"
214 . $more);
215 goto LINE;
216 }
217}
218
219print <<EOF
220/**
221
222\\page PageChange Changelog
223
224\\section SectionChangeList Changes in Gecode Versions
225
226$versions
227 - \\ref SectionChanges_1_0_0 "Gecode 1.0.0 (2005-12-06)"
228
229\\section SectionChangeWhat Gecode Version Numbers
230
231%Gecode version numbers <em>x</em>.<em>y</em>.<em>z</em> change
232according to the following rules (of thumb):
233
234 - when \\e z changes, the programming interfaces for
235 \\ref TaskModel, and \\ref TaskSearch remain
236 stable and only minor additions or improvements are included.
237 - when \\e y changes, the above mentioned interfaces might have changed
238 and medium to major additions or improvements are included.
239 - the change of \\e x is reserved for radical changes to %Gecode.
240
241EOF
242;
243
244print $body;
245print <<EOF
246\\section SectionChanges_1_0_0 Changes in Version 1.0.0 (2005-12-06, initial release)
247
248No changes, of course.
249
250EOF
251;
252print "\n\n*/\n";