Some formatting fixes.

This commit is contained in:
Eli Barzilay 2012-09-08 15:15:47 -04:00
parent 9a884c84fa
commit ff5c9f73ce

View File

@ -18,13 +18,12 @@
(warn "no git dir found => no release info\n (~a)" (warn "no git dir found => no release info\n (~a)"
"set $GIT_DIR to a racket repo .git dir")))] "set $GIT_DIR to a racket repo .git dir")))]
[nowhere (open-output-nowhere)]) [nowhere (open-output-nowhere)])
(and dir (and dir (λ args (define o (open-output-string))
(λ args (define o (open-output-string)) (parameterize ([current-directory dir]
(parameterize ([current-directory dir] [current-output-port o]
[current-output-port o] [current-error-port nowhere])
[current-error-port nowhere]) (and (apply system* exe "--no-pager" args)
(and (apply system* exe "--no-pager" args) (get-output-string o)))))))
(get-output-string o)))))))
(provide get-version-tag-info) (provide get-version-tag-info)
(define (get-version-tag-info version) (define (get-version-tag-info version)
@ -48,11 +47,11 @@
(substring h (cdar m))))) (substring h (cdar m)))))
(regexp-split #rx"\n" (substring text 0 (caar sep))))] (regexp-split #rx"\n" (substring text 0 (caar sep))))]
[text (substring text (cdar sep))]) [text (substring text (cdar sep))])
(match meta (match meta
[`((object ,_) (type "commit") (tag ,_) [`((object ,_) (type "commit") (tag ,_)
(tagger ,(regexp #rx"^(.* <.*>) ([0-9]+) ([-+]?[0-9][0-9])00$" (tagger ,(regexp #rx"^(.* <.*>) ([0-9]+) ([-+]?[0-9][0-9])00$"
(list _ tagger date ofs)))) (list _ tagger date ofs))))
;; ignore the time offset (it probably depends on where the tag ;; ignore the time offset (it probably depends on where the tag
;; was made) ;; was made)
(list tagger (seconds->date (string->number date)) text)] (list tagger (seconds->date (string->number date)) text)]
[_ (check #f)])))) [_ (check #f)]))))