-
Notifications
You must be signed in to change notification settings - Fork 1
/
package.build.php
45 lines (39 loc) · 995 Bytes
/
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());
}
}
/**
* @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());
}
}
/**
* @jppm-task unpublish
*/
function task_unpublish(Event $event)
{
foreach ($event->package()->getAny('modules', []) as $i => $module) {
Tasks::runExternal("./$module", 'unpublish', [], ...$event->flags());
}
}