(define (core-status dirt)
(let* ((version (core-version))
- (lint (core-lint version (core-changes) dirt)))
+ (lint (core-lint version (or (core-changes) '()) dirt)))
(if (not (null? lint))
(begin
(log "# "(project-name)" "(version-string version)":\n")
(define (released-version-lint version released changes)
(cond ((eq? #f released)
(list "First release!"))
- ((and (not (null? changes))
+ ((and (pair? changes)
(not (version>? version released)))
(list "Version is out-of-date."))
(else
(define (core-changes)
(let ((start-hash (released-hash (project-name))))
- (append-map!
- (lambda (hash)
- (let* ((lines (shell-lines "git log --oneline --name-status -1 "hash))
- (files (filter (let ((excludes (plugin-dir-prefixes)))
- (lambda (line)
- (let* ((i (string-find-next-char line #\tab))
- (name (substring line (fix:1+ i))))
- (not (any (lambda (exclude)
- (string-prefix? exclude name))
- excludes)))))
- (cdr lines))))
- (if (null? files)
- '()
- (cons (car lines) files))))
- (shell-lines "git log --format=%H "start-hash"..HEAD"))))
+ (and start-hash
+ (append-map!
+ (lambda (hash)
+ (let* ((lines
+ (shell-lines "git log --oneline --name-status -1 "hash))
+ (files
+ (filter (let ((excludes (plugin-dir-prefixes)))
+ (lambda (line)
+ (let* ((i (string-find-next-char line #\tab))
+ (name (substring line (fix:1+ i))))
+ (not (any (lambda (exclude)
+ (string-prefix? exclude name))
+ excludes)))))
+ (cdr lines))))
+ (if (null? files)
+ '()
+ (cons (car lines) files))))
+ (shell-lines "git log --format=%H "start-hash"..HEAD")))))
#;(define (core-changed-files)
(let ((hash (released-hash (project-name))))
(define (plugin-changes plugin)
(let ((hash (released-hash (plugin-package plugin))))
- (if hash
- (shell-lines "git log --oneline --name-status "hash".."
- " -- "(plugin-directory plugin)"/")
- '())))
+ (and hash
+ (shell-lines "git log --oneline --name-status "hash".."
+ " -- "(plugin-directory plugin)"/"))))
#;(define (plugin-changed-files plugin)
(let ((hash (released-hash (plugin-package plugin))))
(define (devops:release #!optional plugin)
(let ((dirt (shell-lines "git status --porcelain --untracked-files=no")))
(cond ((default-object? plugin)
- (release-core dirt #f))
+ (release-core (core-version) (core-changes) dirt #f))
((or (equal? "snapshot" plugin)
(eq? 'snapshot plugin))
(snapshot-core dirt)
(let* ((name (string plugin))
(p (find (lambda (p) (string=? name (plugin-name p)))
(plugins))))
- (release-plugin p dirt #f)))
+ (release-plugin p (plugin-version p) (plugin-changes p) dirt #f)))
(else
(error "Plugin must be a string or symbol.")))))
(if snap?
(run "git archive --prefix="project"/ HEAD"
" | ( cd devops/"pkgvers" && tar xf - )")
- (let ((hash (car (shell-lines "git log --format=%H -1 HEAD")))
- (datime
- (universal-time->local-time-string (get-universal-time))))
- (run "git tag -s -m \""datime" "hash"\" "pkgvers)
+ (begin
+ (run "git tag -s -m \"\" "pkgvers)
(run "git archive --prefix="project"/ "pkgvers
" | ( cd devops/"pkgvers" && tar xf - )")))
(run "cd devops/"pkgvers" && "project"/dist/make-src-files standard")
(if snap?
(run "git archive --prefix="pkgvers"/ HEAD -- "dir
" | ( cd devops && tar xf - )")
- (let ((hash (car (shell-lines "git log --format=%H -1 HEAD")))
- (datime
- (universal-time->local-time-string (get-universal-time))))
- (run "git tag -s -m \""datime" "hash"\" "pkgvers)
+ (begin
+ (run "git tag -s -m \"\" "pkgvers)
(run "git archive --prefix="pkgvers"/ "pkgvers" -- "dir
" | ( cd devops && tar xf - )")))
(run "cd devops/"pkgvers"/"dir" && ./autogen.sh")
(error "version has not incremented:" version)))))
(define (snapshot-plugin plugin dirt)
- (let* ((changes (plugin-changes plugin))
+ (let* ((changes (or (plugin-changes plugin) '()))
(version (plugin-version plugin))
(released (released-version (plugin-package plugin)))
(vers (version-string version))