@@ -25,14 +25,14 @@ root of a git repo)"
25
25
(with-sh-dir dir
26
26
(when-let [branch-str (first
27
27
(filter #(.startsWith % " *" )
28
- (.split (sh " git" " branch" ) " \n " )))]
28
+ (.split (:out ( sh " git" " branch" ) ) " \n " )))]
29
29
(.substring branch-str 2 ))))
30
30
31
31
(defn has-remote?
32
32
" return true if there is a remote called origin that we could push back to"
33
33
[dir]
34
34
(with-sh-dir dir
35
- (some #(= % " origin" ) (.split (sh " git" " remote" ) " \n " ))))
35
+ (some #(= % " origin" ) (.split (:out ( sh " git" " remote" ) ) " \n " ))))
36
36
37
37
(defn stage-new-doc-files
38
38
" Add any new supplementary documents to the git staging area"
@@ -41,7 +41,7 @@ root of a git repo)"
41
41
(map #(.getPath (File. (File. %) " doc" ))
42
42
(cons " ." (map branch-subdir (next branches)))))]
43
43
(with-sh-dir dir
44
- (println (apply sh " git" " add" " -v" dirs)))))
44
+ (println (:out ( apply sh " git" " add" " -v" dirs) )))))
45
45
46
46
(defn stage-new-api-files
47
47
" Add any new API namespace files to the git staging area"
@@ -50,19 +50,19 @@ root of a git repo)"
50
50
(filter #(.endsWith (.getPath %) " -api.html" )
51
51
(file-seq dir)))]
52
52
(with-sh-dir dir
53
- (println (apply sh " git" " add" " -v" files)))))
53
+ (println (:out ( apply sh " git" " add" " -v" files) )))))
54
54
55
55
(defn stage-modified-files
56
56
" Add any changed files to the git staging area"
57
57
[dir]
58
58
(with-sh-dir dir
59
- (println (sh " git" " add" " -u" " -v" " ." ))))
59
+ (println (:out ( sh " git" " add" " -u" " -v" " ." ) ))))
60
60
61
61
(defn git-hash
62
62
" Get the git hash for the head of the given branch (or tag)"
63
63
[dir head len]
64
64
(with-sh-dir dir
65
- (.substring (.trim (sh " git" " rev-parse" head)) 0 len)))
65
+ (.substring (.trim (:out ( sh " git" " rev-parse" head) )) 0 len)))
66
66
67
67
(defn comment-for
68
68
" Construct a git comment for all the appropriate branches"
@@ -76,13 +76,13 @@ root of a git repo)"
76
76
" Commit the staged files in dir (a java.io.File)."
77
77
[dir comment]
78
78
(with-sh-dir dir
79
- (println (sh " git" " commit" " -m" comment))))
79
+ (println (:out ( sh " git" " commit" " -m" comment) ))))
80
80
81
81
(defn git-push
82
82
" Push the commit to a remote, if defined"
83
83
[dir]
84
84
(with-sh-dir dir
85
- (println (sh " git" " push" " origin" (current-branch dir)))))
85
+ (println (:out ( sh " git" " push" " origin" (current-branch dir) )))))
86
86
87
87
(defn autodoc-commit [src-dir doc-dir branches]
88
88
" Stage and commit all new and changed files in the autodoc tree"
0 commit comments