diff options
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/dataset-metadata-git.scm | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/examples/dataset-metadata-git.scm b/examples/dataset-metadata-git.scm index 32b738b..c9ea59b 100755 --- a/examples/dataset-metadata-git.scm +++ b/examples/dataset-metadata-git.scm @@ -65,15 +65,6 @@ ("contributors.rtf" . ,contributors) ("acknowledgment.rtf" . ,acknowledgment))))) -(define* (commit-changes - directory - #:optional (commit-message "Update dataset RTF Files.")) - (chdir directory) - (system "git reset --hard origin master") - (system "git pull") - (system "git add .") - (system (format #f "git commit -m ~s" commit-message)) - (system "git push origin master")) (let* ((option-spec '((settings (single-char #\s) (value #t)))) @@ -89,9 +80,15 @@ FROM InfoFiles LEFT JOIN Datasets USING (DatasetId)") (call-with-target-database %connection-settings (lambda (db) - (sql-for-each infopages/sql->rtf - db - query) - (commit-changes "/export/data/genenetwork/gn-docs/")))) - - + (let ((dir "/export/data/genenetwork/gn-docs/")) + (chdir dir) + (system "git reset --hard origin") + (system "git pull") + ;; Clear directory so that we can re-do the dump again from the db. + (system "rm -rf general/datasets/*/") + (sql-for-each infopages/sql->rtf + db + query) + (system "git add general/datasets") + (system (format #f "git commit -m ~s" "Update dataset RTF Files.")) + (system "git push origin master"))))) |