Skip to content

Commit

Permalink
makes output extension configurable
Browse files Browse the repository at this point in the history
via project config edn
  • Loading branch information
Benedek Fazekas committed Jan 7, 2015
1 parent cc976ca commit 79ab5b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Binary file modified bin/gargamel.jar
Binary file not shown.
8 changes: 5 additions & 3 deletions src/leiningen/gargamel.clj
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@

(defn create-html-changelog [changes from to source-dir]
(let [to (or to "HEAD")
target-dir (File. target-path)]
target-dir (File. target-path)
extension (or (:output-extension project-config) ".html")
filepath (format "%s/changelog-%s-%s%s" target-path from to extension)]
(when-not (.exists target-dir)
(.mkdirs target-dir))
(spit (format "%s/changelog-%s-%s.html" target-path from to)
(render-html-changelog from to changes source-dir))))
(println "writing changelog file: " filepath)
(spit filepath (render-html-changelog from to changes source-dir))))

(defn gargamel-changelog [project-name path project-dir from to]
(binding [proj-name project-name
Expand Down

0 comments on commit 79ab5b3

Please sign in to comment.