diff options
Diffstat (limited to 'scripts/guix-build-coordinator.in')
-rw-r--r-- | scripts/guix-build-coordinator.in | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/scripts/guix-build-coordinator.in b/scripts/guix-build-coordinator.in index 1336670..9a2d282 100644 --- a/scripts/guix-build-coordinator.in +++ b/scripts/guix-build-coordinator.in @@ -94,32 +94,12 @@ derivation-file))) (simple-format #t "build submitted as ~A\n" uuid)))))) ((arguments ...) - (let ((opts (parse-options arguments))) + (let* ((opts (parse-options arguments)) + (datastore (database-uri->datastore + (assq-ref opts 'database)))) (when (assoc-ref opts 'update-database) - (let ((command - (list (%config 'sqitch) - "deploy" - "--db-client" (%config 'sqitch-psql) - "--chdir" (dirname (%config 'sqitch-plan)) - "--plan-file" (%config 'sqitch-plan) - (string-append "db:pg://" - (%config 'database-user) - "@" - (if (string=? (%config 'database-host) - "localhost") - "" ; This means the unix socket - ; connection will be used - (%config 'database-host)) - "/" - (%config 'database-name))))) - (simple-format #t "running command: ~A\n" - (string-join command)) - (unless (zero? (apply system* command)) - (simple-format - (current-error-port) - "error: sqitch command failed\n") - (exit 1)))) + (datastore-update datastore)) (let ((pid-file (assq-ref opts 'pid-file))) (when pid-file |