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