From 29bde0b968ae1007e0002ef1340d666b99839e7a Mon Sep 17 00:00:00 2001 From: "wjak56@gmail.com" Date: Fri, 21 Aug 2015 22:20:07 -0400 Subject: [PATCH] Use environment variables to store tags ;) This will work honestly --- api.rkt | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/api.rkt b/api.rkt index a585824..bc65b72 100644 --- a/api.rkt +++ b/api.rkt @@ -358,10 +358,30 @@ (substring st 1)) (string-split tag-string)))]))) +; Check the environment variables for any new tags +(define (check-for-tags) + (let* ([environ (current-environment-variables)] + [names (environment-variables-names environ)] + [names* + (filter + (compose1 + (curry + regexp-match + #rx"^[^\\.]+\\.tags$") + string-foldcase + bytes->string/utf-8) + names)]) + (map + (compose1 + bytes->string/utf-8 + (curry environment-variables-ref environ)) + names*))) + + (define (add-tag-alias) ; Should only run when the repo is first made (system - "git config alias.tag !() { git notes --ref=$1 add HEAD -fm \"${*:2}\"")) + "git config alias.tag !() { git notes --ref=$1 add HEAD -fm \"${*:2}\"}")) ;(parameterize ([current-commits (get-commits)])