OILS / devtools / release-version.sh View on Github | oils.pub

1253 lines, 873 significant
1#!/usr/bin/env bash
2#
3# Usage:
4# ./release-version.sh <function name>
5
6set -o nounset
7set -o pipefail
8set -o errexit
9
10source test/common.sh # html-head
11
12# NOTE: Left to right evaluation would be nice on this!
13#
14# Rewrite in YSH:
15#
16# sys.stdin.read() | sub( / "\x00" { any* } "\x01" /, html_escape) | write
17escape-segments() {
18 python2 -c '
19import cgi, re, sys
20
21print re.sub(
22 r"\x00(.*)\x01",
23 lambda match: cgi.escape(match.group(1)),
24 sys.stdin.read())
25'
26}
27
28# TODO: It would be nice to have a column of bugs fixed / addressed!
29
30_git-changelog-body() {
31 local prev_branch=$1
32 local cur_branch=$2
33 shift 2
34
35 # - a trick for HTML escaping (avoid XSS): surround %s with unlikely bytes,
36 # \x00 and \x01. Then pipe Python to escape.
37 # --reverse makes it go in forward chronlogical order.
38
39 # %x00 generates the byte \x00
40 local format='<tr>
41 <td><a class="checksum"
42 href="https://github.com/oils-for-unix/oils/commit/%H">%h</a>
43 </td>
44 <td class="date">%ad</td>
45 <td>%x00%an%x01</td>
46 <td class="subject">%x00%s%x01</td>
47 </tr>'
48 git log \
49 $prev_branch..$cur_branch \
50 --reverse \
51 --pretty="format:$format" \
52 --date=short \
53 "$@" \
54 | escape-segments
55}
56
57_git-changelog-header() {
58 local prev_branch=$1
59 local cur_branch=$2
60
61 html-head --title "Commits Between Branches $prev_branch and $cur_branch" \
62 'web/base.css' 'web/changelog.css'
63
64 cat <<EOF
65 <body class="width60">
66 <h3>Commits Between Branches <code>$prev_branch</code> and
67 <code>$cur_branch</code></h3>
68 <table>
69 <colgroup>
70 <col>
71 <col>
72 <col>
73 <!-- prevent long commits from causing wrapping in other cells -->
74 <col style="width: 40em">
75 </colgroup>
76EOF
77# Doesn't seem necessary now.
78# <thead>
79# <tr>
80# <td>Commit</td>
81# <td>Date</td>
82# <td>Description</td>
83# </tr>
84# </thead>
85}
86
87_git-changelog() {
88 _git-changelog-header "$@"
89 _git-changelog-body "$@"
90 echo '
91 </table>
92 </body>
93</html>
94'
95}
96
97escape-and-shortlog() {
98 python2 -c '
99import cgi, re, sys
100
101by_author = {}
102for line in sys.stdin: # each record is on a line
103 author, record = line.split("\x02")
104 html = re.sub(
105 r"\x00([^\x01]+)\x01",
106 lambda match: cgi.escape(match.group(1)),
107 record)
108 if author not in by_author:
109 by_author[author] = []
110 by_author[author].append(html)
111
112authors = by_author.keys()
113authors.sort(key=lambda x: x.lower()) # case insensitive sort
114
115for author in authors:
116 # author takes up whole row
117 print("<tr><td colspan=2 class=author-cell>")
118 print(author)
119 print("</td> <td></td> </tr>")
120 for html in by_author[author]:
121 print("<tr>")
122 print(html.rstrip())
123 print("</tr>")
124'
125}
126
127git-shortlog-html() {
128 local prev_branch=${1:-release/0.36.0}
129 local cur_branch=${2:-release/0.37.0}
130
131 # Format consumed by escape-and-shortlog above. Git uses %xff for the byte 0x02
132 # - AUTHOR %x02 REST - split by byte 0x02
133 # - anything between %x00 and and %x01 is HTML-escaped
134
135 local format='%an%x02 <td><a class="checksum" href="https://github.com/oils-for-unix/oils/commit/%H">%h</a></td> <td>%x00%s%x01</td>'
136 git log \
137 --pretty="format:$format" \
138 --date=short \
139 $prev_branch..$cur_branch | escape-and-shortlog
140}
141
142test-git-shortlog-html() {
143 local out=_tmp/shortlog.html
144
145 { echo '
146 <style>
147 body {
148 width: 30em;
149 margin: 0 auto;
150 }
151 .checksum {
152 font-family: monospace;
153 margin-left: 2em; /* indent */
154 }
155 #shortlog {
156 font-size: large;
157 }
158 #shortlog td {
159 vertical-align: top;
160 }
161 .author-cell {
162 padding: 1em;
163 }
164 </style>
165 <table id="shortlog">
166 '
167 git-shortlog-html
168 echo '</table>'
169 } > $out
170
171 echo "Wrote $out"
172}
173
174git-changelog-0.1() {
175 local version='0.1.0'
176 _git-changelog release/0.0.0 release/0.1.0 \
177 > ../oilshell.org__deploy/release/$version/changelog.html
178}
179
180git-changelog-0.2.alpha1() {
181 _git-changelog release/0.1.0 release/0.2.alpha1 \
182 > _release/VERSION/changelog.html
183}
184
185git-changelog-0.2.0() {
186 _git-changelog release/0.1.0 release/0.2.0 \
187 > _release/VERSION/changelog.html
188}
189
190git-changelog-0.3.alpha1() {
191 _git-changelog release/0.2.0 release/0.3.alpha1 \
192 > _release/VERSION/changelog.html
193}
194
195git-changelog-0.3.0() {
196 _git-changelog release/0.2.0 release/0.3.0 \
197 > _release/VERSION/changelog.html
198}
199
200git-changelog-0.4.0() {
201 _git-changelog release/0.3.0 release/0.4.0 \
202 > _release/VERSION/changelog.html
203}
204
205git-changelog-0.5.alpha1() {
206 _git-changelog release/0.4.0 release/0.5.alpha1 \
207 > _release/VERSION/changelog.html
208}
209
210# Alpha release logs are relative to last minor release
211git-changelog-0.5.alpha2() {
212 _git-changelog release/0.5.alpha1 release/0.5.alpha2 \
213 > _release/VERSION/changelog.html
214}
215
216git-changelog-0.5.alpha3() {
217 _git-changelog release/0.5.alpha2 release/0.5.alpha3 \
218 > _release/VERSION/changelog.html
219}
220
221# Hm if you're not releasing on the same machine as the previous release, the
222# branch needs origin/ on the front? Is this the best way to do it?
223# NOTE: 'git branch -a' shows all branches.
224
225git-changelog-0.5.0() {
226 # NOTE: release/0.5 branch should be sync'd up with master squashes.
227 _git-changelog origin/release/0.5.alpha3 release/0.5.0 \
228 > _release/VERSION/changelog.html
229}
230
231git-changelog-0.6.pre1() {
232 _git-changelog origin/release/0.5.0 release/0.6.pre1 \
233 > _release/VERSION/changelog.html
234}
235
236git-changelog-0.6.pre2() {
237 _git-changelog origin/release/0.6.pre1 release/0.6.pre2 \
238 > _release/VERSION/changelog.html
239}
240
241git-changelog-0.6.pre3() {
242 _git-changelog origin/release/0.6.pre2 release/0.6.pre3 \
243 > _release/VERSION/changelog.html
244}
245
246git-changelog-0.6.pre4() {
247 _git-changelog origin/release/0.6.pre3 release/0.6.pre4 \
248 > _release/VERSION/changelog.html
249}
250
251git-changelog-0.6.pre5() {
252 _git-changelog origin/release/0.6.pre4 release/0.6.pre5 \
253 > _release/VERSION/changelog.html
254}
255
256git-changelog-0.6.pre6() {
257 _git-changelog origin/release/0.6.pre5 release/0.6.pre6 \
258 > _release/VERSION/changelog.html
259}
260
261git-changelog-0.6.pre7() {
262 _git-changelog origin/release/0.6.pre6 release/0.6.pre7 \
263 > _release/VERSION/changelog.html
264}
265
266git-changelog-0.6.pre8() {
267 _git-changelog origin/release/0.6.pre7 release/0.6.pre8 \
268 > _release/VERSION/changelog.html
269}
270
271git-changelog-0.6.pre9() {
272 _git-changelog origin/release/0.6.pre8 release/0.6.pre9 \
273 > _release/VERSION/changelog.html
274}
275
276git-changelog-0.6.pre10() {
277 _git-changelog origin/release/0.6.pre9 release/0.6.pre10 \
278 > _release/VERSION/changelog.html
279}
280
281git-changelog-0.6.pre11() {
282 _git-changelog origin/release/0.6.pre10 release/0.6.pre11 \
283 > _release/VERSION/changelog.html
284}
285
286git-changelog-0.6.pre12() {
287 _git-changelog origin/release/0.6.pre11 release/0.6.pre12 \
288 > _release/VERSION/changelog.html
289}
290
291git-changelog-0.6.pre13() {
292 _git-changelog origin/release/0.6.pre12 release/0.6.pre13 \
293 > _release/VERSION/changelog.html
294}
295
296git-changelog-0.6.pre14() {
297 _git-changelog origin/release/0.6.pre13 release/0.6.pre14 \
298 > _release/VERSION/changelog.html
299}
300
301git-changelog-0.6.pre15() {
302 _git-changelog origin/release/0.6.pre14 release/0.6.pre15 \
303 > _release/VERSION/changelog.html
304}
305
306git-changelog-0.6.pre16() {
307 _git-changelog origin/release/0.6.pre15 release/0.6.pre16 \
308 > _release/VERSION/changelog.html
309}
310
311git-changelog-0.6.pre17() {
312 _git-changelog origin/release/0.6.pre16 release/0.6.pre17 \
313 > _release/VERSION/changelog.html
314}
315
316git-changelog-0.6.pre18() {
317 _git-changelog origin/release/0.6.pre17 release/0.6.pre18 \
318 > _release/VERSION/changelog.html
319}
320
321git-changelog-0.6.pre19() {
322 _git-changelog origin/release/0.6.pre18 release/0.6.pre19 \
323 > _release/VERSION/changelog.html
324}
325
326git-changelog-0.6.pre20() {
327 _git-changelog origin/release/0.6.pre19 release/0.6.pre20 \
328 > _release/VERSION/changelog.html
329}
330
331git-changelog-0.6.pre21() {
332 _git-changelog origin/release/0.6.pre20 release/0.6.pre21 \
333 > _release/VERSION/changelog.html
334}
335
336git-changelog-0.6.pre22() {
337 _git-changelog origin/release/0.6.pre21 release/0.6.pre22 \
338 > _release/VERSION/changelog.html
339}
340
341git-changelog-0.6.pre23() {
342 _git-changelog origin/release/0.6.pre22 release/0.6.pre23 \
343 > _release/VERSION/changelog.html
344}
345
346git-changelog-0.6.0() {
347 _git-changelog origin/release/0.6.pre23 release/0.6.0 \
348 > _release/VERSION/changelog.html
349}
350
351git-changelog-0.7.pre1() {
352 _git-changelog origin/release/0.6.0 release/0.7.pre1 \
353 > _release/VERSION/changelog.html
354}
355
356git-changelog-0.7.pre2() {
357 _git-changelog origin/release/0.7.pre1 release/0.7.pre2 \
358 > _release/VERSION/changelog.html
359}
360
361git-changelog-0.7.pre3() {
362 _git-changelog origin/release/0.7.pre2 release/0.7.pre3 \
363 > _release/VERSION/changelog.html
364}
365
366git-changelog-0.7.pre4() {
367 _git-changelog origin/release/0.7.pre3 release/0.7.pre4 \
368 > _release/VERSION/changelog.html
369}
370
371git-changelog-0.7.pre5() {
372 _git-changelog origin/release/0.7.pre4 release/0.7.pre5 \
373 > _release/VERSION/changelog.html
374}
375
376git-changelog-0.7.pre6() {
377 _git-changelog origin/release/0.7.pre5 release/0.7.pre6 \
378 > _release/VERSION/changelog.html
379}
380
381git-changelog-0.7.pre7() {
382 _git-changelog origin/release/0.7.pre6 release/0.7.pre7 \
383 > _release/VERSION/changelog.html
384}
385
386git-changelog-0.7.pre8() {
387 _git-changelog origin/release/0.7.pre7 release/0.7.pre8 \
388 > _release/VERSION/changelog.html
389}
390
391git-changelog-0.7.pre9() {
392 _git-changelog origin/release/0.7.pre8 release/0.7.pre9 \
393 > _release/VERSION/changelog.html
394}
395
396git-changelog-0.7.pre10() {
397 _git-changelog origin/release/0.7.pre9 release/0.7.pre10 \
398 > _release/VERSION/changelog.html
399}
400
401git-changelog-0.7.pre11() {
402 _git-changelog origin/release/0.7.pre10 release/0.7.pre11 \
403 > _release/VERSION/changelog.html
404}
405
406git-changelog-0.7.0() {
407 _git-changelog origin/release/0.7.pre11 release/0.7.0 \
408 > _release/VERSION/changelog.html
409}
410
411git-changelog-0.8.pre1() {
412 _git-changelog origin/release/0.7.0 release/0.8.pre1 \
413 > _release/VERSION/changelog.html
414}
415
416git-changelog-0.8.pre2() {
417 _git-changelog origin/release/0.8.pre1 release/0.8.pre2 \
418 > _release/VERSION/changelog.html
419}
420
421git-changelog-0.8.pre3() {
422 _git-changelog origin/release/0.8.pre2 release/0.8.pre3 \
423 > _release/VERSION/changelog.html
424}
425
426git-changelog-0.8.pre4() {
427 _git-changelog origin/release/0.8.pre3 release/0.8.pre4 \
428 > _release/VERSION/changelog.html
429}
430
431git-changelog-0.8.pre5() {
432 _git-changelog origin/release/0.8.pre4 release/0.8.pre5 \
433 > _release/VERSION/changelog.html
434}
435
436git-changelog-0.8.pre6() {
437 _git-changelog origin/release/0.8.pre5 release/0.8.pre6 \
438 > _release/VERSION/changelog.html
439}
440
441git-changelog-0.8.pre7() {
442 _git-changelog origin/release/0.8.pre6 release/0.8.pre7 \
443 > _release/VERSION/changelog.html
444}
445
446git-changelog-0.8.pre8() {
447 _git-changelog origin/release/0.8.pre7 release/0.8.pre8 \
448 > _release/VERSION/changelog.html
449}
450
451git-changelog-0.8.pre9() {
452 _git-changelog origin/release/0.8.pre8 release/0.8.pre9 \
453 > _release/VERSION/changelog.html
454}
455
456git-changelog-0.8.pre10() {
457 _git-changelog origin/release/0.8.pre9 release/0.8.pre10 \
458 > _release/VERSION/changelog.html
459}
460
461git-changelog-0.8.pre11() {
462 _git-changelog origin/release/0.8.pre10 release/0.8.pre11 \
463 > _release/VERSION/changelog.html
464}
465
466git-changelog-0.8.0() {
467 _git-changelog origin/release/0.8.pre11 release/0.8.0 \
468 > _release/VERSION/changelog.html
469}
470
471git-changelog-0.8.1() {
472 _git-changelog origin/release/0.8.0 release/0.8.1 \
473 > _release/VERSION/changelog.html
474}
475
476git-changelog-0.8.2() {
477 _git-changelog origin/release/0.8.1 release/0.8.2 \
478 > _release/VERSION/changelog.html
479}
480
481git-changelog-0.8.3() {
482 _git-changelog origin/release/0.8.2 release/0.8.3 \
483 > _release/VERSION/changelog.html
484}
485
486git-changelog-0.8.4() {
487 _git-changelog origin/release/0.8.3 release/0.8.4 \
488 > _release/VERSION/changelog.html
489}
490
491git-changelog-0.8.5() {
492 _git-changelog origin/release/0.8.4 release/0.8.5 \
493 > _release/VERSION/changelog.html
494}
495
496git-changelog-0.8.6() {
497 _git-changelog origin/release/0.8.5 release/0.8.6 \
498 > _release/VERSION/changelog.html
499}
500
501git-changelog-0.8.7() {
502 _git-changelog origin/release/0.8.6 release/0.8.7 \
503 > _release/VERSION/changelog.html
504}
505
506git-changelog-0.8.8() {
507 _git-changelog origin/release/0.8.7 release/0.8.8 \
508 > _release/VERSION/changelog.html
509}
510
511git-changelog-0.8.9() {
512 _git-changelog origin/release/0.8.8 release/0.8.9 \
513 > _release/VERSION/changelog.html
514}
515
516git-changelog-0.8.10() {
517 _git-changelog origin/release/0.8.9 release/0.8.10 \
518 > _release/VERSION/changelog.html
519}
520
521git-changelog-0.8.11() {
522 _git-changelog origin/release/0.8.10 release/0.8.11 \
523 > _release/VERSION/changelog.html
524}
525
526git-changelog-0.8.12() {
527 _git-changelog origin/release/0.8.11 release/0.8.12 \
528 > _release/VERSION/changelog.html
529}
530
531git-changelog-0.9.0() {
532 _git-changelog origin/release/0.8.12 release/0.9.0 \
533 > _release/VERSION/changelog.html
534}
535
536git-changelog-0.9.1() {
537 _git-changelog origin/release/0.9.0 release/0.9.1 \
538 > _release/VERSION/changelog.html
539}
540
541git-changelog-0.9.3() {
542 _git-changelog origin/release/0.9.2 release/0.9.3 \
543 > _release/VERSION/changelog.html
544}
545
546git-changelog-0.9.4() {
547 _git-changelog origin/release/0.9.3 release/0.9.4 \
548 > _release/VERSION/changelog.html
549}
550
551git-changelog-0.9.5() {
552 _git-changelog origin/release/0.9.4 release/0.9.5 \
553 > _release/VERSION/changelog.html
554}
555
556git-changelog-0.9.6() {
557 _git-changelog origin/release/0.9.5 release/0.9.6 \
558 > _release/VERSION/changelog.html
559}
560
561git-changelog-0.9.7() {
562 _git-changelog origin/release/0.9.6 release/0.9.7 \
563 > _release/VERSION/changelog.html
564}
565
566git-changelog-0.9.8() {
567 _git-changelog origin/release/0.9.7 release/0.9.8 \
568 > _release/VERSION/changelog.html
569}
570
571git-changelog-0.9.9() {
572 _git-changelog origin/release/0.9.8 release/0.9.9 \
573 > _release/VERSION/changelog.html
574}
575
576git-changelog-0.10.0() {
577 _git-changelog origin/release/0.9.9 release/0.10.0 \
578 > _release/VERSION/changelog.html
579}
580
581git-changelog-0.10.1() {
582 _git-changelog origin/release/0.10.0 release/0.10.1 \
583 > _release/VERSION/changelog.html
584}
585
586git-changelog-0.11.0() {
587 _git-changelog origin/release/0.10.1 release/0.11.0 \
588 > _release/VERSION/changelog.html
589}
590
591git-changelog-0.12.0() {
592 _git-changelog origin/release/0.11.0 release/0.12.0 \
593 > _release/VERSION/changelog.html
594}
595
596git-changelog-0.12.3() {
597 _git-changelog origin/release/0.12.0 release/0.12.3 \
598 > _release/VERSION/changelog.html
599}
600
601git-changelog-0.12.4() {
602 _git-changelog origin/release/0.12.3 release/0.12.4 \
603 > _release/VERSION/changelog.html
604}
605
606git-changelog-0.12.5() {
607 _git-changelog origin/release/0.12.4 release/0.12.5 \
608 > _release/VERSION/changelog.html
609}
610
611git-changelog-0.12.6() {
612 _git-changelog origin/release/0.12.5 release/0.12.6 \
613 > _release/VERSION/changelog.html
614}
615
616git-changelog-0.12.7() {
617 _git-changelog origin/release/0.12.6 release/0.12.7 \
618 > _release/VERSION/changelog.html
619}
620
621git-changelog-0.12.8() {
622 _git-changelog origin/release/0.12.7 release/0.12.8 \
623 > _release/VERSION/changelog.html
624}
625
626git-changelog-0.12.9() {
627 _git-changelog origin/release/0.12.8 release/0.12.9 \
628 > _release/VERSION/changelog.html
629}
630
631git-changelog-0.13.0() {
632 _git-changelog origin/release/0.12.9 release/0.13.0 \
633 > _release/VERSION/changelog.html
634}
635
636git-changelog-0.13.1() {
637 _git-changelog origin/release/0.13.0 release/0.13.1 \
638 > _release/VERSION/changelog.html
639}
640
641git-changelog-0.14.0() {
642 _git-changelog origin/release/0.13.1 release/0.14.0 \
643 > _release/VERSION/changelog.html
644}
645
646git-changelog-0.14.1() {
647 _git-changelog origin/release/0.14.0 release/0.14.1 \
648 > _release/VERSION/changelog.html
649}
650
651git-changelog-0.14.2() {
652 _git-changelog origin/release/0.14.1 release/0.14.2 \
653 > _release/VERSION/changelog.html
654}
655
656git-changelog-0.15.0() {
657 _git-changelog origin/release/0.14.2 release/0.15.0 \
658 > _release/VERSION/changelog.html
659}
660
661git-changelog-0.16.0() {
662 _git-changelog origin/release/0.15.0 release/0.16.0 \
663 > _release/VERSION/changelog.html
664}
665
666git-changelog-0.17.0() {
667 _git-changelog origin/release/0.16.0 release/0.17.0 \
668 > _release/VERSION/changelog.html
669}
670
671git-changelog-0.18.0() {
672 _git-changelog origin/release/0.17.0 release/0.18.0 \
673 > _release/VERSION/changelog.html
674}
675
676git-changelog-0.19.0() {
677 _git-changelog origin/release/0.18.0 release/0.19.0 \
678 > _release/VERSION/changelog.html
679}
680
681git-changelog-0.20.0() {
682 _git-changelog origin/release/0.19.0 release/0.20.0 \
683 > _release/VERSION/changelog.html
684}
685
686git-changelog-0.21.0() {
687 _git-changelog origin/release/0.20.0 release/0.21.0 \
688 > _release/VERSION/changelog.html
689}
690
691git-changelog-0.22.0() {
692 _git-changelog origin/release/0.21.0 release/0.22.0 \
693 > _release/VERSION/changelog.html
694}
695
696git-changelog-0.23.0() {
697 _git-changelog origin/release/0.22.0 release/0.23.0 \
698 > _release/VERSION/changelog.html
699}
700
701git-changelog-0.24.0() {
702 _git-changelog origin/release/0.23.0 release/0.24.0 \
703 > _release/VERSION/changelog.html
704}
705
706git-changelog-0.25.0() {
707 _git-changelog origin/release/0.24.0 release/0.25.0 \
708 > _release/VERSION/changelog.html
709}
710
711git-changelog-0.26.0() {
712 _git-changelog origin/release/0.25.0 release/0.26.0 \
713 > _release/VERSION/changelog.html
714}
715
716git-changelog-0.27.0() {
717 _git-changelog origin/release/0.26.0 release/0.27.0 \
718 > _release/VERSION/changelog.html
719}
720
721git-changelog-0.28.0() {
722 _git-changelog origin/release/0.27.0 release/0.28.0 \
723 > _release/VERSION/changelog.html
724}
725
726git-changelog-0.29.0() {
727 _git-changelog origin/release/0.28.0 release/0.29.0 \
728 > _release/VERSION/changelog.html
729}
730
731git-changelog-0.30.0() {
732 _git-changelog origin/release/0.29.0 release/0.30.0 \
733 > _release/VERSION/changelog.html
734}
735
736git-changelog-0.31.0() {
737 _git-changelog origin/release/0.30.0 release/0.31.0 \
738 > _release/VERSION/changelog.html
739}
740
741git-changelog-0.32.0() {
742 _git-changelog origin/release/0.31.0 release/0.32.0 \
743 > _release/VERSION/changelog.html
744}
745
746git-changelog-0.33.0() {
747 _git-changelog origin/release/0.32.0 release/0.33.0 \
748 > _release/VERSION/changelog.html
749}
750
751git-changelog-0.34.0() {
752 _git-changelog origin/release/0.33.0 release/0.34.0 \
753 > _release/VERSION/changelog.html
754}
755
756git-changelog-0.35.0() {
757 _git-changelog origin/release/0.34.0 release/0.35.0 \
758 > _release/VERSION/changelog.html
759}
760
761git-changelog-0.36.0() {
762 _git-changelog origin/release/0.35.0 release/0.36.0 \
763 > _release/VERSION/changelog.html
764}
765
766git-changelog-0.37.0() {
767 _git-changelog origin/release/0.36.0 release/0.37.0 \
768 > _release/VERSION/changelog.html
769}
770
771# For announcement.html
772html-redirect() {
773 local url=$1
774 cat <<EOF
775<!DOCTYPE html>
776<html>
777 <head>
778 <meta http-equiv="refresh" content="0; url=$url" />
779 </head>
780 <body>
781 <p>Redirect to<a href="$url">$url</a></p>
782 </body>
783</html>
784EOF
785}
786
787no-announcement() {
788 html-head --title 'No announcement'
789 cat <<EOF
790 <body>
791 <p>No announcement for this release. Previous announcements are tagged
792 with #<a href="/blog/tags.html?tag=oils-release#oils-release">oils-release</a>.
793 </p>
794 </body>
795</html>
796EOF
797}
798
799write-no-announcement() {
800 no-announcement > _release/VERSION/announcement.html
801}
802
803readonly SITE_DEPLOY_DIR='../../oilshell/oilshell.org__deploy'
804
805announcement-0.0() {
806 html-redirect '/blog/2017/07/23.html' \
807 > ../oilshell.org__deploy/release/0.0.0/announcement.html
808}
809
810announcement-0.1() {
811 local version='0.1.0'
812 html-redirect '/blog/2017/09/09.html' \
813 > ../oilshell.org__deploy/release/$version/announcement.html
814}
815
816announcement-0.2() {
817 html-redirect '/blog/2017/11/10.html' > _release/VERSION/announcement.html
818}
819
820announcement-0.3() {
821 html-redirect '/blog/2017/12/22.html' > _release/VERSION/announcement.html
822 #no-announcement > _release/VERSION/announcement.html
823}
824
825announcement-0.4() {
826 html-redirect '/blog/2018/02/03.html' > _release/VERSION/announcement.html
827}
828
829announcement-0.5.alpha3() {
830 html-redirect '/blog/2018/04/30.html' > _release/VERSION/announcement.html
831}
832
833announcement-0.5() {
834 html-redirect '/blog/2018/07/12.html' > _release/VERSION/announcement.html
835}
836
837announcement-0.6.pre1() {
838 html-redirect '/blog/2018/08/15.html' > _release/VERSION/announcement.html
839}
840
841announcement-0.6.pre2() {
842 html-redirect '/blog/2018/08/19.html' > _release/VERSION/announcement.html
843}
844
845announcement-0.6.pre3() {
846 write-no-announcement
847}
848
849announcement-0.6.pre4() {
850 write-no-announcement
851}
852
853announcement-0.6.pre5() {
854 html-redirect '/blog/2018/10/11.html' > $SITE_DEPLOY_DIR/release/0.6.pre5/announcement.html
855}
856
857announcement-0.6.pre6() {
858 no-announcement > $SITE_DEPLOY_DIR/release/0.6.pre6/announcement.html
859}
860
861announcement-0.6.pre7() {
862 write-no-announcement
863}
864
865announcement-0.6.pre8() {
866 html-redirect '/blog/2018/11/15.html' > $SITE_DEPLOY_DIR/release/0.6.pre8/announcement.html
867}
868
869announcement-0.6.pre9() {
870 write-no-announcement
871}
872
873announcement-0.6.pre10() {
874 write-no-announcement
875}
876
877announcement-0.6.pre11() {
878 html-redirect '/blog/2018/12/16.html' > $SITE_DEPLOY_DIR/release/0.6.pre11/announcement.html
879}
880
881announcement-0.6.pre12() {
882 html-redirect '/blog/2019/01/18.html' > $SITE_DEPLOY_DIR/release/0.6.pre12/announcement.html
883}
884
885announcement-0.6.pre13() {
886 html-redirect '/blog/2019/02/05.html' > $SITE_DEPLOY_DIR/release/0.6.pre13/announcement.html
887}
888
889announcement-0.6.pre14() {
890 html-redirect '/blog/2019/02/18.html' > $SITE_DEPLOY_DIR/release/0.6.pre14/announcement.html
891}
892
893announcement-0.6.pre15() {
894 html-redirect '/blog/2019/02/18.html' > $SITE_DEPLOY_DIR/release/0.6.pre15/announcement.html
895}
896
897announcement-0.6.pre16-to-22() {
898 for i in {16..22}; do
899 html-redirect '/blog/2019/06/13.html' > $SITE_DEPLOY_DIR/release/0.6.pre$i/announcement.html
900 done
901}
902
903announcement-0.6.pre23() {
904 html-redirect '/blog/2019/07/19.html' > $SITE_DEPLOY_DIR/release/0.6.pre23/announcement.html
905}
906
907announcement-0.6.0() {
908 html-redirect '/blog/2019/07/19.html' > $SITE_DEPLOY_DIR/release/0.6.0/announcement.html
909}
910
911announcement-0.7.pre1() {
912 html-redirect '/blog/2019/07/19.html' > $SITE_DEPLOY_DIR/release/0.7.pre1/announcement.html
913}
914
915announcement-0.7.pre2() {
916 write-no-announcement
917}
918
919announcement-0.7.pre3() {
920 write-no-announcement
921}
922
923announcement-0.7.pre4() {
924 write-no-announcement
925}
926
927announcement-0.7.pre5() {
928 write-no-announcement
929}
930
931announcement-0.7.pre6() {
932 html-redirect '/blog/2016/12/09.html' > $SITE_DEPLOY_DIR/release/0.7.pre6/announcement.html
933}
934
935announcement-0.7.pre7() {
936 html-redirect '/blog/2019/12/09.html' > $SITE_DEPLOY_DIR/release/0.7.pre7/announcement.html
937}
938
939announcement-0.7.pre8() {
940 html-redirect '/blog/2019/12/09.html' > $SITE_DEPLOY_DIR/release/0.7.pre8/announcement.html
941}
942
943announcement-0.7.pre9() {
944 html-redirect '/blog/2019/12/09.html' > $SITE_DEPLOY_DIR/release/0.7.pre9/announcement.html
945}
946
947announcement-0.7.pre10() {
948 write-no-announcement
949}
950
951announcement-0.7.pre11() {
952 write-no-announcement
953}
954
955announcement-0.7.0() {
956 html-redirect '/blog/2020/02/recap.html' > $SITE_DEPLOY_DIR/release/0.7.0/announcement.html
957}
958
959announcement-0.8.pre1() {
960 html-redirect '/blog/2020/02/recap.html' > $SITE_DEPLOY_DIR/release/0.8.pre1/announcement.html
961}
962
963announcement-0.8.pre2() {
964 html-redirect '/blog/2020/03/release-metrics.html' > $SITE_DEPLOY_DIR/release/0.8.pre2/announcement.html
965}
966
967announcement-0.8.pre3() {
968 html-redirect '/blog/2020/03/release-0.8.pre3.html' > $SITE_DEPLOY_DIR/release/0.8.pre3/announcement.html
969}
970
971announcement-0.8.pre4() {
972 html-redirect '/blog/2020/04/release-0.8.pre4.html' > $SITE_DEPLOY_DIR/release/0.8.pre4/announcement.html
973}
974
975announcement-0.8.pre5() {
976 html-redirect '/blog/2020/05/translation-progress.html' > $SITE_DEPLOY_DIR/release/0.8.pre5/announcement.html
977}
978
979announcement-0.8.pre6() {
980 html-redirect '/blog/2020/06/release-0.8.pre6.html' > $SITE_DEPLOY_DIR/release/0.8.pre6/announcement.html
981}
982
983announcement-0.8.pre7() {
984 write-no-announcement
985}
986
987announcement-0.8.pre8() {
988 write-no-announcement
989}
990
991announcement-0.8.pre9() {
992 write-no-announcement
993}
994
995announcement-0.8.pre10() {
996 write-no-announcement
997}
998
999announcement-0.8.pre11() {
1000 write-no-announcement
1001}
1002
1003announcement-0.8.0() {
1004 write-no-announcement
1005}
1006
1007announcement-0.8.1() {
1008 write-no-announcement
1009}
1010
1011announcement-0.8.2() {
1012 write-no-announcement
1013}
1014
1015announcement-0.8.3() {
1016 write-no-announcement
1017}
1018
1019announcement-0.8.4() {
1020 write-no-announcement
1021}
1022
1023announcement-0.8.5() {
1024 write-no-announcement
1025}
1026
1027announcement-0.8.6() {
1028 write-no-announcement
1029}
1030
1031announcement-0.8.7() {
1032 write-no-announcement
1033}
1034
1035announcement-0.8.8() {
1036 write-no-announcement
1037}
1038
1039announcement-0.8.9() {
1040 write-no-announcement
1041}
1042
1043announcement-0.8.10() {
1044 write-no-announcement
1045}
1046
1047announcement-0.8.11() {
1048 write-no-announcement
1049}
1050
1051announcement-0.8.12() {
1052 write-no-announcement
1053}
1054
1055announcement-0.9.0() {
1056 write-no-announcement
1057}
1058
1059announcement-0.9.1() {
1060 write-no-announcement
1061}
1062
1063announcement-0.9.3() {
1064 write-no-announcement
1065}
1066
1067announcement-0.9.4() {
1068 write-no-announcement
1069}
1070
1071announcement-0.9.5() {
1072 write-no-announcement
1073}
1074
1075announcement-0.9.6() {
1076 write-no-announcement
1077}
1078
1079announcement-0.9.7() {
1080 write-no-announcement
1081}
1082
1083announcement-0.9.8() {
1084 write-no-announcement
1085}
1086
1087announcement-0.9.9() {
1088 write-no-announcement
1089}
1090
1091announcement-0.10.0() {
1092 write-no-announcement
1093}
1094
1095announcement-0.10.1() {
1096 write-no-announcement
1097}
1098
1099announcement-0.11.0() {
1100 write-no-announcement
1101}
1102
1103announcement-0.12.0() {
1104 write-no-announcement
1105}
1106
1107announcement-0.12.3() {
1108 write-no-announcement
1109}
1110
1111announcement-0.12.4() {
1112 write-no-announcement
1113}
1114
1115announcement-0.12.5() {
1116 write-no-announcement
1117}
1118
1119announcement-0.12.6() {
1120 write-no-announcement
1121}
1122
1123announcement-0.12.7() {
1124 html-redirect '/blog/2022/10/garbage-collector.html' > $SITE_DEPLOY_DIR/release/0.12.7/announcement.html
1125}
1126
1127announcement-0.12.8() {
1128 write-no-announcement
1129}
1130
1131announcement-0.12.9() {
1132 write-no-announcement
1133}
1134
1135announcement-0.13.0() {
1136 write-no-announcement
1137}
1138
1139announcement-0.13.1() {
1140 write-no-announcement
1141}
1142
1143announcement-0.14.0() {
1144 write-no-announcement
1145}
1146
1147announcement-0.14.1() {
1148 write-no-announcement
1149}
1150
1151announcement-0.14.2() {
1152 html-redirect '/blog/2023/03/release-0.14.2.html' > $SITE_DEPLOY_DIR/release/0.14.2/announcement.html
1153}
1154
1155announcement-0.15.0() {
1156 html-redirect '/blog/2023/05/release-0.15.0.html' > $SITE_DEPLOY_DIR/release/0.15.0/announcement.html
1157}
1158
1159announcement-0.16.0() {
1160 html-redirect '/blog/2023/06/release-0.16.0.html' > $SITE_DEPLOY_DIR/release/0.16.0/announcement.html
1161}
1162
1163announcement-0.17.0() {
1164 html-redirect '/blog/2023/08/release-0.17.0.html' > $SITE_DEPLOY_DIR/release/0.17.0/announcement.html
1165}
1166
1167announcement-0.18.0() {
1168 html-redirect '/blog/2023/09/release-0.18.0.html' > $SITE_DEPLOY_DIR/release/0.18.0/announcement.html
1169}
1170
1171announcement-0.19.0() {
1172 html-redirect '/blog/2024/01/release-0.19.0.html' > $SITE_DEPLOY_DIR/release/0.19.0/announcement.html
1173}
1174
1175announcement-0.20.0() {
1176 html-redirect '/blog/2024/02/release-0.20.0.html' > $SITE_DEPLOY_DIR/release/0.20.0/announcement.html
1177}
1178
1179announcement-0.21.0() {
1180 html-redirect '/blog/2024/03/release-0.21.0.html' > $SITE_DEPLOY_DIR/release/0.21.0/announcement.html
1181}
1182
1183announcement-0.22.0() {
1184 html-redirect '/blog/2024/06/release-0.22.0.html' > $SITE_DEPLOY_DIR/release/0.22.0/announcement.html
1185}
1186
1187announcement-0.23.0() {
1188 html-redirect '/blog/2024/11/release-0.23.0.html' > $SITE_DEPLOY_DIR/release/0.23.0/announcement.html
1189}
1190
1191announcement-0.24.0() {
1192 html-redirect '/blog/2025/01/release-0.24.0.html' > $SITE_DEPLOY_DIR/release/0.24.0/announcement.html
1193}
1194
1195announcement-0.25.0() {
1196 write-no-announcement
1197}
1198
1199announcement-0.26.0() {
1200 write-no-announcement
1201}
1202
1203announcement-0.27.0() {
1204 write-no-announcement
1205}
1206
1207announcement-0.28.0() {
1208 write-no-announcement
1209}
1210
1211announcement-0.29.0() {
1212 write-no-announcement
1213}
1214
1215announcement-0.30.0() {
1216 write-no-announcement
1217}
1218
1219announcement-0.31.0() {
1220 write-no-announcement
1221}
1222
1223announcement-0.32.0() {
1224 write-no-announcement
1225}
1226
1227announcement-0.33.0() {
1228 write-no-announcement
1229}
1230
1231announcement-0.34.0() {
1232 write-no-announcement
1233}
1234
1235announcement-0.35.0() {
1236 write-no-announcement
1237}
1238
1239announcement-0.36.0() {
1240 write-no-announcement
1241}
1242
1243announcement-0.37.0() {
1244 write-no-announcement
1245}
1246
1247blog-redirect() {
1248 html-redirect 'making-plans.html' > $SITE_DEPLOY_DIR/blog/2020/01/11.html
1249}
1250
1251if test $(basename $0) = 'release-version.sh'; then
1252 "$@"
1253fi