about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--genenetwork-development.scm34
1 files changed, 18 insertions, 16 deletions
diff --git a/genenetwork-development.scm b/genenetwork-development.scm
index e7edf7b..7ca5d58 100644
--- a/genenetwork-development.scm
+++ b/genenetwork-development.scm
@@ -738,24 +738,26 @@ server described by CONFIG, a <genenetwork-configuration> object."
          (setenv "REQUESTS_CA_BUNDLE" (getenv "SSL_CERT_FILE"))
 
          (let ((current-repo-path "/export/data/repositories/gn-docs"))
-           (when (file-exists? current-repo-path)
-             (delete-file-recursively current-repo-path))
 	   (setenv "CURRENT_REPO_PATH" current-repo-path)
 	   (with-directory-excursion
-	       "/export/data/repositories"
-	     (invoke #$(file-append git-minimal "/bin/git")
-                     "clone" "--depth" "1" (getenv "CGIT_REPO_PATH") current-repo-path)
-	     (when (file-exists? "gn-guile")
-               (delete-file-recursively "gn-guile"))
-	     (invoke "git" "clone" "--depth" "1" "https://git.genenetwork.org/gn-guile")
-	     ;; We have a gn-guile-dev wrapper script that sets a "./" in the
-             ;; GN_GUILE_LOAD_PATH hence allowing this to be run from the gn-guile
-             ;; directory.  This allows gn-guile to be run from the latest
-             ;; upstream commits without pinning to guix.
-             (with-directory-excursion "gn-guile"
-	       (show-head-commit)
-	       (invoke #$(file-append gn-guile "/bin/gn-guile-dev")
-		       (number->string #$gn-guile-port)))))))))
+	    "/export/data/repositories"
+	    ;; All edits go to the current-repo-path; so we need it to
+	    ;; be persistent.
+	    (unless (file-exists? current-repo-path)
+              (invoke #$(file-append git-minimal "/bin/git")
+                      "clone" "--depth" "1" (getenv "CGIT_REPO_PATH") current-repo-path))
+
+	    (when (file-exists? "gn-guile")
+              (delete-file-recursively "gn-guile"))
+	    (invoke "git" "clone" "--depth" "1" "https://git.genenetwork.org/gn-guile")
+	    ;; We have a gn-guile-dev wrapper script that sets a "./" in the
+            ;; GN_GUILE_LOAD_PATH hence allowing this to be run from the gn-guile
+            ;; directory.  This allows gn-guile to be run from the latest
+            ;; upstream commits without pinning to guix.
+            (with-directory-excursion "gn-guile"
+				      (show-head-commit)
+				      (invoke #$(file-append gn-guile "/bin/gn-guile-dev")
+					      (number->string #$gn-guile-port)))))))))
 
 (define (genenetwork-shepherd-services config)
   "Return shepherd services to run the genenetwork development server