www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 64a990422c9f331de398add643c392af55bcf7fa
parent 82992db6b4a8f88bc95d4235270e178224b973f9
Author: Matthew Flatt <mflatt@racket-lang.org>
Date:   Mon,  1 Jul 2013 11:08:19 -0600

distro-build/farm: add `#:pull?' configuration

original commit: bb49d66ed1a7e9bf9adec454f82b219cd47ebe23

Diffstat:
Mpkgs/distro-build/drive-clients.rkt | 19+++++++++++--------
Mpkgs/distro-build/farm.rkt | 12+++++++++---
2 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/pkgs/distro-build/drive-clients.rkt b/pkgs/distro-build/drive-clients.rkt @@ -178,7 +178,7 @@ " DIST_SUFFIX=" (q dist-suffix) " RELEASE_MODE=" (if release? "--release" (q "")))) -(define (unix-build c host port user server repo clean? +(define (unix-build c host port user server repo clean? pull? pkgs dist-name dist-base dist-dir dist-suffix) (define dir (or (get-opt c '#:dir) "build/plt")) @@ -192,8 +192,9 @@ (sh "if [ ! -d " (q dir) " ] ; then" " git clone " (q repo) " " (q dir) " ; " "fi") - (sh "cd " (q dir) " ; " - "git pull") + (and pull? + (sh "cd " (q dir) " ; " + "git pull")) (sh "cd " (q dir) " ; " "make -j " j " client" (client-args (client-name c) @@ -202,7 +203,7 @@ " CORE_CONFIGURE_ARGS=" (q (apply ~a #:separator " " (get-opt c '#:configure null)))))) -(define (windows-build c host port user server repo clean? +(define (windows-build c host port user server repo clean? pull? pkgs dist-name dist-base dist-dir dist-suffix) (define dir (or (get-opt c '#:dir) "build\\plt")) @@ -218,8 +219,9 @@ (and clean? (cmd "IF EXIST " (q dir) " rmdir /S /Q " (q dir))) (cmd "IF NOT EXIST " (q dir) " git clone " (q repo) " " (q dir)) - (cmd "cd " (q dir) - " && git pull") + (and pull? + (cmd "cd " (q dir) + " && git pull")) (cmd "cd " (q dir) " && \"c:\\Program Files" (if (= bits 64) " (x86)" "") "\\Microsoft Visual Studio 9.0\\vc\\vcvarsall.bat\"" " " vc @@ -251,10 +253,11 @@ (if (eq? v 'none) default-clean? v))) + (define pull? (get-opt c '#:pull? #t)) ((case (or (get-opt c '#:platform) 'unix) [(unix) unix-build] [else windows-build]) - c host port user server repo clean? + c host port user server repo clean? pull? pkgs dist-name dist-base dist-dir dist-suffix)) ;; ---------------------------------------- @@ -305,7 +308,7 @@ (define new-opts (merge-options opts config)) (define ts (map (lambda (c) (loop c - (car config) + (farm-config-tag config) new-opts)) (get-content config))) (define (wait) diff --git a/pkgs/distro-build/farm.rkt b/pkgs/distro-build/farm.rkt @@ -120,9 +120,14 @@ ;; #:timeout <number> --- numbers of seconds to wait before declaring ;; failure; defaults to 30 minutes ;; #:clean? <boolean> --- if true, then the build process on the client -;; machine starts by removing <dir>; the default -;; is #f, but the `--clean' command-line flag -;; changes the default to #t +;; machine starts by removing <dir>; set this +;; to #f for a shared repo checkout; the default +;; is determined by the `CLEAN_MODE' makefile +;; variable or `--clean' command-line flag +;; #:pull? <boolean> --- if true, then the build process on the client +;; machine starts by a `git pull' in <dir>; set +;; to #f, for example, for a repo checkout that is +;; shared with server; the default is #t ;; ;; Machine-only keywords: ;; #:name <string> --- defaults to host; this string is recorded as @@ -298,6 +303,7 @@ [(#:j) (exact-positive-integer? val)] [(#:repo) (string? val)] [(#:clean?) (boolean? val)] + [(#:pull?) (boolean? val)] [else #f])) (define (check-machine-keyword kw val)