-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.build.php
46 lines (39 loc) · 1.03 KB
/
package.build.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
use packager\Event;
/**
* @jppm-task hub:publish
*/
function task_hubPublish(Event $event)
{
foreach ($event->package()->getAny('modules', []) as $i => $module) {
Tasks::copy("./package.hub.yml", "./$module", true);
Tasks::runExternal("./$module", 'hub:publish', [], ...$event->flags());
if ($i == 0) {
Tasks::copy("./wizard-core/package.hub.yml", "./");
Tasks::deleteFile("./$module/package.hub.yml");
}
}
}
/**
* @jppm-task doc:build
*/
function task_docBuild(Event $event)
{
foreach ($event->package()->getAny('modules', []) as $i => $module) {
Tasks::runExternal("./$module", 'doc:build');
}
}
/**
* @jppm-task publish
*/
function task_publish(Event $event)
{
foreach ($event->package()->getAny('modules', []) as $i => $module) {
Tasks::runExternal("./$module", 'publish', [], ...$event->flags());
}
}
function task_test(Event $event)
{
Tasks::runExternal("./wizard-core", "install");
Tasks::runExternal("./wizard-core", "test");
}