zealot: ensure that the github source exists on disk.
parent
70076fa7cd
commit
4d3bc90e9d
|
@ -123,6 +123,8 @@ M: windows factor-path "./factor.com" ;
|
|||
] with-directory ;
|
||||
|
||||
: build-new-factor ( branch -- )
|
||||
"factor" "factor" zealot-github-ensure drop
|
||||
|
||||
[ "factor" "factor" zealot-github-clone-paths nip ] dip
|
||||
over <pathname> . flush yield
|
||||
{
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
! 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 uuid ;
|
||||
USING: cli.git combinators fry io.directories io.files.info
|
||||
io.pathnames kernel sequences uuid web-services.github ;
|
||||
IN: zealot
|
||||
|
||||
: default-zealot-directory ( chunk -- path ) [ home ".zealot" ] dip 3append-path ;
|
||||
|
@ -48,6 +48,19 @@ IN: zealot
|
|||
: zealot-github-pull ( user project -- process )
|
||||
[ git-pull* ] with-zealot-github-project-directory ;
|
||||
|
||||
: zealot-github-exists-locally? ( user project -- ? )
|
||||
zealot-github-source-path ?file-info >boolean ;
|
||||
|
||||
: zealot-github-ensure ( user project -- process )
|
||||
2dup zealot-github-exists-locally? [
|
||||
{
|
||||
[ zealot-github-fetch-all drop ]
|
||||
[ zealot-github-fetch-tags drop ]
|
||||
[ zealot-github-pull ]
|
||||
} 2cleave
|
||||
] [
|
||||
zealot-github-clone
|
||||
] if ;
|
||||
|
||||
: zealot-github-set-build-remote ( path user project -- process )
|
||||
'[ "origin" _ _ github-ssh-uri git-change-remote* ] with-directory ;
|
||||
|
|
Loading…
Reference in New Issue