'())))
(define (news-version-lint plugin version)
- (let ((nvers (read-news-version plugin version)))
+ (let ((nvers (read-news-version plugin)))
(if nvers
(if (string=? nvers (version-string version))
'()
(list "NEWS version not found."))))
(define (subsystem-version-lint plugin version)
- (let ((svers (read-subsystem-version plugin version)))
+ (let ((svers (read-subsystem-version plugin)))
(if svers
(if (version=? svers version)
'()
(group day (+ (char-in numeric)))
(string-end))))
-(define (read-news-version plugin version)
+(define (read-news-version plugin)
(let* ((fullname (string (project-name)"-"(plugin-name plugin)))
(file (string (plugin-directory plugin)"/NEWS")))
(and (file-exists? file)
(match-extract match 'version)
(loop))))))))))))
-(define (make-subsystem-pattern plugin)
+(define subsystem-pattern
(compile-regsexp
'(seq "(add-subsystem-identification!"
" \""(+ (char-not-in #\"))"\""
")"))
")")))
-(define (read-subsystem-version plugin version)
- (let* ((fullname (string (project-name)"-"(plugin-name plugin)))
- (file (find-plugin-make.scm plugin)))
+(define (read-subsystem-version plugin)
+ (let ((file (find-plugin-make.scm plugin)))
(and file
- (let ((pattern (make-subsystem-pattern plugin)))
- (call-with-input-file file
- (lambda (in)
- (let loop ()
- (let ((line (read-line in)))
- (if (eof-object? line)
- #f
- (let ((match (regsexp-match-string pattern line)))
- (if match
- (call-with-input-string
- (match-extract match 'version)
- read)
- (loop))))))))))))
+ (call-with-input-file file
+ (lambda (in)
+ (let loop ()
+ (let ((line (read-line in)))
+ (if (eof-object? line)
+ #f
+ (let ((match
+ (regsexp-match-string subsystem-pattern line)))
+ (if match
+ (call-with-input-string
+ (match-extract match 'version)
+ read)
+ (loop)))))))))))
(define (find-plugin-make.scm plugin)
(or (let ((file (string (plugin-directory plugin)"/make.scm")))
(logfile (string "devops/"pkgvers"-src.log"))
(dir (plugin-directory plugin)))
(log "# "pkgvers":\n")
- (write-lint (plugin-lint plugin version changes dirt))
+ (write-lint (plugin-lint plugin version '() dirt))
(with-output-log
logfile
(lambda ()