Support vcs tag prefix.

This commit is contained in:
Phil Hagelberg 2014-06-09 15:54:46 -07:00
parent f8a9e54736
commit e8ebbc0734

View file

@ -50,7 +50,7 @@
;;; Git ;;; Git
(defmethod push :git [project & [args]] (defmethod push :git [project & args]
(binding [eval/*dir* (:root project)] (binding [eval/*dir* (:root project)]
(apply eval/sh "git" "push" args) (apply eval/sh "git" "push" args)
(apply eval/sh "git" "push" "--tags" args))) (apply eval/sh "git" "push" "--tags" args)))
@ -60,9 +60,11 @@
(eval/sh "git" "add" "-A") (eval/sh "git" "add" "-A")
(eval/sh "git" "commit" "-m" (str "Version " (:version project))))) (eval/sh "git" "commit" "-m" (str "Version " (:version project)))))
(defmethod tag :git [project] (defmethod tag :git [{:keys [root version]} & [prefix]]
(binding [eval/*dir* (:root project)] (binding [eval/*dir* root]
(let [version (:version project)] (let [tag (if prefix
(str prefix "-" version)
version)]
(eval/sh "git" "tag" "-s" version "-m" (str "Release " version))))) (eval/sh "git" "tag" "-s" version "-m" (str "Release " version)))))
(defmethod assert-committed :git [project] (defmethod assert-committed :git [project]