Skip to content

Commit 0c1a9fe

Browse files
committed
Generator: fix git getting branches
1 parent fba5958 commit 0c1a9fe

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/wiki/generator/git.clj

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@
6060
tag-lines (split (run-git git-ssh path "for-each-ref" "--format='%(refname:short)|-|%(objectname)|-|%(authorname)|-|%(contents:subject)'" "refs/tags") #"\n")
6161
lines (map (fn [line]
6262
(-> line
63-
(string/replace #"^(')(.*)(')$" "$2") ;; delete start and end quotes ' ;; delete ?origin/"
64-
(string/replace #"^([^/]*)/(.*)$" "$2")))
63+
(string/replace #"^(')(.*)(')$" "$2") ;; delete start and end quotes '
64+
;; delete ?origin/"
65+
(string/replace #"^(origin|tags)/" "")))
6566
(sort (distinct (concat branch-lines tag-lines))))
67+
_ (prn :lines lines)
6668
filtered-lines (filter (fn [s] (and (some? s)
6769
(seq s)
6870
(not (string/starts-with? s "HEAD")))) lines)

src/wiki/web/handlers/links_handlers.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
(defn links [request]
1515
(let [version (-> request :params :version)
1616
version (if (or (= version "latest")
17-
(= version "Release Candidate")
18-
(= version "rc"))
17+
(= version "Release Candidate")
18+
(= version "rc"))
1919
(versions-data/default (jdbc request))
2020
version)
2121

0 commit comments

Comments
 (0)