]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/update/latest/latest.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / update / latest / latest.factor
1 USING: kernel namespaces system io.files io.pathnames io.directories
2 bootstrap.image http.client update update.backup update.util ;
3 IN: update.latest
4
5 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6
7 : git-pull-master ( -- )
8   image-path parent-directory
9     [
10       { "git" "pull" "git://factorcode.org/git/factor.git" "master" }
11       run-command
12     ]
13   with-directory ;
14
15 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
17 : remote-latest-image ( -- url )
18   { "http://factorcode.org/images/latest/" my-boot-image-name } to-string ;
19
20 : download-latest-image ( -- ) remote-latest-image download ;
21
22 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
23
24 : rebuild-latest ( -- )
25   image-path parent-directory
26     [
27       backup
28       download-latest-image
29       make-clean
30       make
31       boot
32     ]
33   with-directory ;
34
35 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
36
37 : update-latest ( -- )
38   image-path parent-directory
39     [
40       git-id
41       git-pull-master
42       git-id
43       = not
44         [ rebuild-latest ]
45       when
46     ]
47   with-directory ;
48
49 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
50
51 MAIN: update-latest