change release-notes' "info.rkt" field to release-note-files'

The change avoids a collision with PLaneT fields.

Also, add checking for the form of a `release-note-files' value.
This commit is contained in:
Matthew Flatt 2013-07-17 17:22:38 -06:00
parent 1c6257a129
commit 8f195a1ff6
11 changed files with 48 additions and 22 deletions

View File

@ -9,4 +9,4 @@
(define gracket-launcher-names '("DrRacket")) (define gracket-launcher-names '("DrRacket"))
(define gracket-launcher-libraries '("drracket.rkt")) (define gracket-launcher-libraries '("drracket.rkt"))
(define release-notes (list (list "DrRacket" "HISTORY.txt"))) (define release-note-files (list (list "DrRacket" "HISTORY.txt")))

View File

@ -3,7 +3,8 @@
(define version '(400)) (define version '(400))
(define post-install-collection "installer.rkt") (define post-install-collection "installer.rkt")
(define release-notes '(("GRacket and racket/gui" "HISTORY.txt" (define release-note-files
'(("GRacket and racket/gui" "HISTORY.txt"
0 0
(("Porting from v5.0.x to v5.1" "Draw_and_GUI_5_1.txt") (("Porting from v5.0.x to v5.1" "Draw_and_GUI_5_1.txt")
("Porting to v1xxx" "MrEd_100.txt") ("Porting to v1xxx" "MrEd_100.txt")

View File

@ -6,4 +6,4 @@
(define drracket-tool-icons (list '("stepper-32x32.png" "icons"))) (define drracket-tool-icons (list '("stepper-32x32.png" "icons")))
(define release-notes (list (list "Stepper" "HISTORY.txt"))) (define release-note-files (list (list "Stepper" "HISTORY.txt")))

View File

@ -1,3 +1,3 @@
#lang info #lang info
(define release-notes (list (list "Teachpacks" "HISTORY.txt"))) (define release-note-files (list (list "Teachpacks" "HISTORY.txt")))

View File

@ -8,4 +8,4 @@
(define compile-omit-paths '("tests")) (define compile-omit-paths '("tests"))
(define blurb (define blurb
`("The picturing-programs collection supersedes the tiles and sb-world collections. It provides functions to rotate, etc. images, as well as a slightly modified version of the universe teachpack.")) `("The picturing-programs collection supersedes the tiles and sb-world collections. It provides functions to rotate, etc. images, as well as a slightly modified version of the universe teachpack."))
(define release-notes '(("Picturing Programs" "HISTORY.txt"))) (define release-note-files '(("Picturing Programs" "HISTORY.txt")))

View File

@ -7,7 +7,7 @@
(define primary-file "main.rkt") (define primary-file "main.rkt")
(define scribblings '(("scribblings/plai.scrbl" (multi-page) (teaching -20)))) (define scribblings '(("scribblings/plai.scrbl" (multi-page) (teaching -20))))
(define release-notes (list (list "PLAI" "HISTORY.txt"))) (define release-note-files (list (list "PLAI" "HISTORY.txt")))
(define deps '("base" (define deps '("base"
"gui-lib" "gui-lib"
"sandbox-lib" "sandbox-lib"

View File

@ -434,12 +434,12 @@ Optional @filepath{info.rkt} fields trigger additional actions by
is given a value of @racket[10], the search page is given a is given a value of @racket[10], the search page is given a
value of @racket[-10], and the default is @racket[0].} value of @racket[-10], and the default is @racket[0].}
@item{@as-index{@racketidfont{release-notes}} : @racket[(listof (cons/c string? (cons/c string? list?)))] --- @item{@as-index{@racketidfont{release-note-files}} : @racket[(listof (cons/c string? (cons/c string? list?)))] ---
A list of release-notes text files to link from the main documentation pages. A list of release-notes text files to link from the main documentation pages.
Each note is itself represented as a list, and the list can specify auxiliary Each note is itself represented as a list, and the list can specify auxiliary
notes that are grouped with the main note. notes that are grouped with the main note.
A @racketidfont{release-notes} entry must be a value A @racketidfont{release-note-files} entry must be a value
that can be generated from an expression matching the following that can be generated from an expression matching the following
@racket[entry] grammar: @racket[entry] grammar:

View File

@ -11,12 +11,37 @@
(struct notes (pos label path subs) (struct notes (pos label path subs)
#:transparent) #:transparent)
(define (check-release-note-files l dir)
(if (and (list? l)
(for/and ([v (in-list l)])
(and ((length v) . >= . 2)
(string? (car v))
(path-string? (cadr v))
(or (null? (cddr v))
(exact-integer? (caddr v))
(or (null? (cdddr v))
(list? (cadddr v))
(for/and ([i (in-list (cadddr v))])
(and (list? i)
(= (length i) 2)
(string? (car i))
(path-string? (cadr i)))))))))
#t
(begin
(log-error "bad `release-note-files' entry in: ~a value: ~e"
(build-path dir "info.rkt")
l)
#f)))
(define (build-release-list which) (define (build-release-list which)
(sort (sort
(for*/list ([dir (in-list (find-relevant-directories '(release-notes) which))] (for*/list ([dir (in-list (find-relevant-directories '(release-note-files) which))]
[rel (let ([i (get-info/full dir)]) [rel (let ([i (get-info/full dir)])
(if i (if i
(i 'release-notes (lambda () null)) (let ([v (i 'release-note-files (lambda () null))])
(if (check-release-note-files v dir)
v
null))
null))]) null))])
(define label (car rel)) (define label (car rel))
(define file (cadr rel)) (define file (cadr rel))

View File

@ -3,6 +3,6 @@
(define collection "redex") (define collection "redex")
(define name "PLT Redex") (define name "PLT Redex")
(define release-notes (list (list "Redex" "HISTORY.txt"))) (define release-note-files (list (list "Redex" "HISTORY.txt")))

View File

@ -1,3 +1,3 @@
#lang info #lang info
(define release-notes '(("Typed Racket" "HISTORY.txt"))) (define release-note-files '(("Typed Racket" "HISTORY.txt")))

View File

@ -1,6 +1,6 @@
#lang info #lang info
(define release-notes '(("Racket core" "HISTORY.txt" (define release-note-files '(("Racket core" "HISTORY.txt"
-100 -100
(("Porting from v4.x to v5.x" "Racket_5.txt") (("Porting from v4.x to v5.x" "Racket_5.txt")
("Porting from v3xxx to v4.x" "MzScheme_4.txt") ("Porting from v3xxx to v4.x" "MzScheme_4.txt")