File tree Expand file tree Collapse file tree 1 file changed +32
-4
lines changed Expand file tree Collapse file tree 1 file changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -42,14 +42,42 @@ multi MAIN ('setup') {
42
42
my $ repo = $ component <repo_url >;
43
43
my $ bare = " $ name .git" ;
44
44
run < git clone --bare >, $ repo , $ bare unless $ bare . IO . d ;
45
+ run < git clone -l >, $ bare , $ name unless $ name . IO . d ;
46
+ }
47
+
48
+ say ' Setup complete.' ;
49
+ }
50
+
51
+ # = Fetch latest commits in each cloned component
52
+ multi MAIN (' fetch' ) {
53
+ unless ' components' . IO . d {
54
+ say " There is no 'components' tree, and thus there are no repos to fetch." ;
55
+ say " Please run `$ * PROGRAM_NAME setup` instead." ;
56
+ return ;
57
+ }
58
+
59
+ chdir ' components' ;
60
+ my $ comp_dir = cwd;
61
+
62
+ for dir(' .' ). sort -> $ component-name {
63
+ say " ==> $ component-name" ;
64
+ my $ bare = " $ component-name /$ component-name .git" ;
65
+
66
+ unless $ bare . IO . d {
67
+ say " No bare repository exists for component $ component-name ; can't fetch updates." ;
68
+ next ;
69
+ }
45
70
46
71
% * ENV <GIT_DIR > = $ bare ;
47
- my $ tag_list = open ' git tag' , : p;
48
- my @ tags = $ tag_list . lines ;
49
- . say for @ tags ;
72
+ run < git fetch >;
50
73
}
74
+ }
51
75
52
- say ' Setup complete.' ;
76
+ multi MAIN (' build' ) {
77
+ # %*ENV<GIT_DIR> = $bare;
78
+ # my $tag_list = open 'git tag', :p;
79
+ # my @tags = $tag_list.lines;
80
+ # .say for @tags;
53
81
}
54
82
55
83
# = Clean up generated files and directories
You can’t perform that action at this time.
0 commit comments