diff options
author | rsiddharth <s@ricketyspace.net> | 2016-07-10 02:46:50 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2016-07-10 02:46:50 +0000 |
commit | dcd3d99f8be71994aca50468f3e6151e6a544a41 (patch) | |
tree | 86c27d27f80436fd560dfe7a7ccc0a6519d4492b /git-difme.scm | |
parent | fd87baf2fc35e73ee09f5268b67a1ead2f43d72a (diff) |
add difme worker functions.
* git-scm (build-stage-regex, work-difme): new functions.
(difme): new function; incomplete.
Diffstat (limited to 'git-difme.scm')
-rw-r--r-- | git-difme.scm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/git-difme.scm b/git-difme.scm index f2f098d..baa5bbd 100644 --- a/git-difme.scm +++ b/git-difme.scm @@ -117,6 +117,27 @@ the commit message will be in the following format: (with-directory-excursion repo (difme-exec cmd)))) +;;;; difme workers +(define (build-stage-regex rules) + "build stage regex based on RULES." + (let ((regex "^")) + (cond ((null? rules) (string-append regex ".")) + (else (string-append + regex "[" (string-concatenate rules) "]"))))) + +(define (difme repo) + "stage and commit relevant files in REPO. + +also does `git push` to the REPO' default upstream remote." + (let* ((path (car repo)) + (rules (cdr repo)) + (stage-regex (build-stage-regex rules))) + stage-regex)) + +(define (walk-difme repos) + "walk through each difme repo in REPOS and `difme` it." + (map difme repos)) + ;;;; main (define (main srcs) "zarking main." |