(defn make-git-scm [git-dir]
(try
(let [origin (read-git-origin git-dir)
head (read-git-head git-dir)
urls (github-urls origin)
scm (Scm.)]
(.setUrl scm (:browse urls))
(.setTag scm head)
(when (:public-clone urls)
(.setConnection scm (str "scm:git:" (:public-clone urls))))
(when (:dev-clone urls)
(.setDeveloperConnection scm (str "scm:git:" (:dev-clone urls))))
scm)
(catch java.io.FileNotFoundException e
nil)))
Comments top
No comments for make-git-scm. Log in to add a comment.