Version logic extended
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
(define collection "git-cli")
|
||||
(define pkg-desc "Command-line-like Git operations for Racket, interface to the git cli command")
|
||||
(define version "0.3.18")
|
||||
(define version "0.3.19")
|
||||
(define pkg-authors '("Hans Dijkema"))
|
||||
(define license 'MIT)
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
git-help
|
||||
git-version
|
||||
git-new-version
|
||||
git-next-version
|
||||
current-git-authentication-handler
|
||||
exn:fail:git-auth?
|
||||
exn:fail:git-auth-command
|
||||
@@ -592,11 +593,28 @@
|
||||
(when (null? args)
|
||||
(error "git-new-version expects 'maj, 'major, 'min, 'minor or 'patch"))
|
||||
(let ((kind (car args)))
|
||||
(git-next-version kind ".")
|
||||
(info-next-version kind ".")
|
||||
(git-version)))
|
||||
|
||||
(hash-set! git-commands 'new-version cmd-git-new-version)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; goal : Implement the registered next-version command.
|
||||
; pre : args must be empty.
|
||||
; post : The version definition in info.rkt has been updated.
|
||||
; result : The new patch version.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define (git-next-version . args)
|
||||
(cmd-git-next-version args))
|
||||
|
||||
(define (cmd-git-next-version args)
|
||||
(unless (null? args)
|
||||
(error "git-next-version expexts no arguments"))
|
||||
(let ((kind 'patch))
|
||||
(info-next-version kind ".")
|
||||
(git-version)))
|
||||
|
||||
(hash-set! git-commands 'next-version cmd-git-next-version)
|
||||
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
|
||||
(provide info-version
|
||||
set-info-version!
|
||||
git-next-version
|
||||
info-next-version
|
||||
)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
@@ -74,7 +74,7 @@
|
||||
; post : The version definition in info.rkt has been updated.
|
||||
; result : #t after writing the new version.
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
(define (git-next-version kind . dir*)
|
||||
(define (info-next-version kind . dir*)
|
||||
(let ((dir (if (null? dir*)
|
||||
"."
|
||||
(car dir*))))
|
||||
|
||||
Reference in New Issue
Block a user