zealot: Initial commit.
Zealot is a replacement for mason that allows parallel testing, testing branches, and over-engineered git commands.modern-harvey2
parent
994485a90c
commit
7ff2b9c345
|
@ -14,7 +14,6 @@ Factor/factor
|
||||||
*.image
|
*.image
|
||||||
factor.image.fresh
|
factor.image.fresh
|
||||||
*.dylib
|
*.dylib
|
||||||
factor
|
|
||||||
factor.com
|
factor.com
|
||||||
*#*#
|
*#*#
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Doug Coleman
|
|
@ -0,0 +1 @@
|
||||||
|
Doug Coleman
|
|
@ -0,0 +1,43 @@
|
||||||
|
! Copyright (C) 2017 Doug Coleman.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: arrays bootstrap.image cli.git combinators formatting fry
|
||||||
|
http.client io.directories io.launcher kernel math.parser
|
||||||
|
sequences system-info zealot ;
|
||||||
|
IN: zealot.factor
|
||||||
|
|
||||||
|
: download-boot-checksums ( path branch -- )
|
||||||
|
'[ _ "http://downloads.factorcode.org/images/%s/checksums.txt" sprintf download ] with-directory ;
|
||||||
|
|
||||||
|
: download-boot-image ( path branch image-name -- )
|
||||||
|
'[ _ _ "http://downloads.factorcode.org/images/%s/%s" sprintf download ] with-directory ;
|
||||||
|
|
||||||
|
: download-my-boot-image ( path branch -- )
|
||||||
|
my-boot-image-name download-boot-image ;
|
||||||
|
|
||||||
|
: compile-factor ( path -- process )
|
||||||
|
[ { "make" "-j" } cpus number>string suffix run-process ] with-directory ;
|
||||||
|
|
||||||
|
: bootstrap-factor ( path -- )
|
||||||
|
[ "./factor" "-i=" my-boot-image-name append 2array try-output-process ] with-directory ;
|
||||||
|
|
||||||
|
: build-sh-update-factor ( path -- process )
|
||||||
|
[ { "build.sh" "update" } run-process ] with-directory ;
|
||||||
|
|
||||||
|
: factor-load-all ( path -- )
|
||||||
|
[
|
||||||
|
"./factor" "-e=\"USE: vocabs.hierarchy load-all USE: memory save\"" 2array
|
||||||
|
run-process drop
|
||||||
|
] with-directory ;
|
||||||
|
|
||||||
|
: build-new-factor ( branch -- )
|
||||||
|
[ "factor" "factor" zealot-github-clone-paths nip ] dip
|
||||||
|
{
|
||||||
|
[ drop "factor" "factor" zealot-github-add-build-remote drop ]
|
||||||
|
[ drop [ git-fetch-all* ] with-directory drop ]
|
||||||
|
[ zealot-build-checkout-branch drop ]
|
||||||
|
[ download-my-boot-image ]
|
||||||
|
[ download-boot-checksums ]
|
||||||
|
[ drop compile-factor drop ]
|
||||||
|
[ drop bootstrap-factor ]
|
||||||
|
[ drop factor-load-all ]
|
||||||
|
} 2cleave ;
|
|
@ -0,0 +1,64 @@
|
||||||
|
! Copyright (C) 2017 Doug Coleman.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: cli.git fry io.directories io.pathnames kernel sequences
|
||||||
|
web-services.github zealot.utils uuid ;
|
||||||
|
IN: zealot
|
||||||
|
|
||||||
|
: default-zealot-directory ( chunk -- path ) [ home ".zealot" ] dip 3append-path ;
|
||||||
|
: default-zealot-source-directory ( -- path ) "source" default-zealot-directory ;
|
||||||
|
: default-zealot-builds-directory ( -- path ) "builds" default-zealot-directory ;
|
||||||
|
|
||||||
|
: zealot-source-directory ( chunk -- path ) [ default-zealot-source-directory ] dip append-path ;
|
||||||
|
: zealot-builds-directory ( chunk -- path ) [ default-zealot-builds-directory ] dip append-path ;
|
||||||
|
|
||||||
|
: with-default-zealot-source-directory ( chunk quot -- )
|
||||||
|
[ default-zealot-source-directory ] dip with-ensure-directory ; inline
|
||||||
|
|
||||||
|
: with-default-zealot-builds-directory ( chunk quot -- )
|
||||||
|
[ default-zealot-builds-directory ] dip with-ensure-directory ; inline
|
||||||
|
|
||||||
|
: with-zealot-source-directory ( chunk quot -- )
|
||||||
|
[ zealot-source-directory ] dip with-ensure-directory ; inline
|
||||||
|
|
||||||
|
: with-zealot-builds-directory ( chunk quot -- )
|
||||||
|
[ zealot-builds-directory ] dip with-ensure-directory ; inline
|
||||||
|
|
||||||
|
|
||||||
|
: with-zealot-github-directory ( quot -- )
|
||||||
|
[ "github" ] dip with-zealot-source-directory ; inline
|
||||||
|
|
||||||
|
: with-zealot-github-project-directory ( user project quot -- )
|
||||||
|
[ "github" ] 3dip [ 3append-path ] dip with-zealot-source-directory ; inline
|
||||||
|
|
||||||
|
: zealot-github-clone ( user project -- process )
|
||||||
|
'[ _ _ 2dup "/" glue github-git-clone-as ] with-zealot-github-directory ; inline
|
||||||
|
|
||||||
|
: zealot-github-source-path ( user project -- path )
|
||||||
|
[ "github" ] 2dip 3append-path zealot-source-directory ;
|
||||||
|
|
||||||
|
: zealot-github-builds-path ( user project -- path )
|
||||||
|
[ "github" ] 2dip 3append-path uuid1 append-path zealot-builds-directory ;
|
||||||
|
|
||||||
|
: zealot-github-fetch-all ( user project -- process )
|
||||||
|
[ git-fetch-all* ] with-zealot-github-project-directory ;
|
||||||
|
|
||||||
|
: zealot-github-fetch-tags ( user project -- process )
|
||||||
|
[ git-fetch-tags* ] with-zealot-github-project-directory ;
|
||||||
|
|
||||||
|
: zealot-github-pull ( user project -- process )
|
||||||
|
[ git-pull* ] with-zealot-github-project-directory ;
|
||||||
|
|
||||||
|
|
||||||
|
: zealot-github-set-build-remote ( path user project -- process )
|
||||||
|
'[ "origin" _ _ github-ssh-uri git-change-remote* ] with-directory ;
|
||||||
|
|
||||||
|
: zealot-github-add-build-remote ( path user project -- process )
|
||||||
|
'[ "github" _ _ github-ssh-uri git-remote-add* ] with-directory ;
|
||||||
|
|
||||||
|
: zealot-github-clone-paths ( user project -- process builds-path )
|
||||||
|
[ zealot-github-source-path ]
|
||||||
|
[ zealot-github-builds-path ] 2bi
|
||||||
|
[ git-clone-as ] keep ;
|
||||||
|
|
||||||
|
: zealot-build-checkout-branch ( path branch -- process )
|
||||||
|
'[ _ git-checkout-existing-branch* ] with-directory ;
|
Loading…
Reference in New Issue