Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F1688592
GetDependenciesWorkflow.php
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
avivey
Jun 15 2016, 11:52 PM
2016-06-15 23:52:16 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
GetDependenciesWorkflow.php
View Options
<?php
final
class
GetDependenciesWorkflow
extends
ArcanistWorkflow
{
public
function
getWorkflowName
()
{
return
'get-dependencies'
;
}
public
function
getCommandSynopses
()
{
return
phutil_console_format
(
<<<EOTEXT
**get-dependencies**
EOTEXT
);
}
public
function
getCommandHelp
()
{
return
phutil_console_format
(
<<<EOTEXT
Download external resources you might need.
EOTEXT
);
}
public
function
run
()
{
$console
=
PhutilConsole
::
getConsole
();
$lib
=
'libname'
;
$root
=
dirname
(
phutil_get_library_root
(
$lib
));
$working_copy
=
ArcanistWorkingCopyIdentity
::
newFromPath
(
$root
);
$configuration_manager
=
clone
$this
->
getConfigurationManager
();
$configuration_manager
->
setWorkingCopyIdentity
(
$working_copy
);
$repository
=
ArcanistRepositoryAPI
::
newAPIFromConfigurationManager
(
$configuration_manager
);
$dependencies
=
array
(
array
(
'filename'
=>
'checkstyle-6.14.1-all.jar'
,
'sha1'
=>
'8e2c3a2bcef100c084e6ea80cc426b3443632d8c'
,
'uri'
=>
'http://my.web.server/checkstyle-6.14.1.jar'
,
),
);
chdir
(
$root
.
'/resources/'
);
foreach
(
$dependencies
as
$dep
)
{
phutil_passthru
(
'curl -o %s %s'
,
$dep
[
'filename'
],
$dep
[
'uri'
]);
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
178528
Default Alt Text
GetDependenciesWorkflow.php (1 KB)
Attached To
Mode
P1993 GetDependenciesWorkflow.php
Attached
Detach File
Event Timeline
Log In to Comment