Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P1993
GetDependenciesWorkflow.php
Active
Public
Actions
Authored by
avivey
on Jun 15 2016, 11:52 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F1688592: GetDependenciesWorkflow.php
Jun 15 2016, 11:52 PM
2016-06-15 23:52:16 (UTC+0)
Subscribers
None
<?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'
]);
}
}
}
Event Timeline
avivey
created this paste.
Jun 15 2016, 11:52 PM
2016-06-15 23:52:16 (UTC+0)
avivey
mentioned this in
D14632: Add Java linters, checkstyle and PMD
.
avivey
changed the visibility from "All Users" to "Public (No Login Required)".
Jun 21 2018, 7:46 PM
2018-06-21 19:46:43 (UTC+0)
Log In to Comment