diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-05-11 22:42:59 -0400 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2021-05-11 22:42:59 -0400 |
| commit | b7cbca221f74e9e9ef43c228dca9fa9930babec5 (patch) | |
| tree | 33d0c1b2ae9a09a6e50652f61cdb16c7ba5d9003 /build-aux | |
| parent | c80627731bc100baa4b6c5d265df5465cee9498e (diff) | |
| parent | fb5d04d36334784a5ac76c4a90de1e1376120885 (diff) | |
Merge branch 'version-1.3.0'
Diffstat (limited to 'build-aux')
| -rw-r--r-- | build-aux/update-NEWS.scm | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/build-aux/update-NEWS.scm b/build-aux/update-NEWS.scm index a05ecad0910..c029d2f0dab 100644 --- a/build-aux/update-NEWS.scm +++ b/build-aux/update-NEWS.scm | |||
| @@ -95,7 +95,7 @@ paragraph." | |||
| 95 | (with-atomic-file-replacement news-file | 95 | (with-atomic-file-replacement news-file |
| 96 | (lambda (input output) | 96 | (lambda (input output) |
| 97 | (rewrite-org-section input output | 97 | (rewrite-org-section input output |
| 98 | (make-regexp "^(\\*+) (.*) new packages") | 98 | (make-regexp "^(\\*+).*new packages") |
| 99 | (lambda (match port) | 99 | (lambda (match port) |
| 100 | (let ((stars (match:substring match 1))) | 100 | (let ((stars (match:substring match 1))) |
| 101 | (format port | 101 | (format port |
| @@ -141,7 +141,7 @@ paragraph." | |||
| 141 | (with-atomic-file-replacement news-file | 141 | (with-atomic-file-replacement news-file |
| 142 | (lambda (input output) | 142 | (lambda (input output) |
| 143 | (rewrite-org-section input output | 143 | (rewrite-org-section input output |
| 144 | (make-regexp "^(\\*+) (.*) package updates") | 144 | (make-regexp "^(\\*+).*package updates") |
| 145 | (lambda (match port) | 145 | (lambda (match port) |
| 146 | (let ((stars (match:substring match 1)) | 146 | (let ((stars (match:substring match 1)) |
| 147 | (lst (map (match-lambda | 147 | (lst (map (match-lambda |
| @@ -166,16 +166,22 @@ paragraph." | |||
| 166 | (string-append data-directory "/packages-" | 166 | (string-append data-directory "/packages-" |
| 167 | version ".txt")) | 167 | version ".txt")) |
| 168 | 168 | ||
| 169 | (define (package<? p1 p2) | ||
| 170 | (string<? (package-full-name p1) (package-full-name p2))) | ||
| 171 | |||
| 169 | (let-values (((previous-version new-version) | 172 | (let-values (((previous-version new-version) |
| 170 | (call-with-input-file news-file NEWS->versions))) | 173 | (call-with-input-file news-file NEWS->versions))) |
| 171 | (format (current-error-port) "Updating NEWS for ~a to ~a...~%" | 174 | (format (current-error-port) "Updating NEWS for ~a to ~a...~%" |
| 172 | previous-version new-version) | 175 | previous-version new-version) |
| 173 | (let* ((old (call-with-input-file (package-file previous-version) | 176 | (let* ((old (call-with-input-file (package-file previous-version) |
| 174 | read)) | 177 | read)) |
| 175 | (new (fold-packages (lambda (p r) | 178 | (all-packages/sorted (sort (fold-packages (lambda (p r) |
| 176 | (alist-cons (package-name p) (package-version p) | 179 | (cons p r)) |
| 177 | r)) | 180 | '()) |
| 178 | '()))) | 181 | package<?)) |
| 182 | (new (map (lambda (p) | ||
| 183 | (cons (package-name p) (package-version p))) | ||
| 184 | all-packages/sorted))) | ||
| 179 | (call-with-output-file (package-file new-version) | 185 | (call-with-output-file (package-file new-version) |
| 180 | (lambda (port) | 186 | (lambda (port) |
| 181 | (pretty-print new port))) | 187 | (pretty-print new port))) |
