mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Minor tidying of ArcanistVersionWorkflow
Summary: Self-explanatory. Test Plan: Eyeball it. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11553
This commit is contained in:
parent
e9ffde30ba
commit
c76c5d893e
1 changed files with 9 additions and 3 deletions
|
@ -29,7 +29,9 @@ EOTEXT
|
||||||
|
|
||||||
if (!Filesystem::binaryExists('git')) {
|
if (!Filesystem::binaryExists('git')) {
|
||||||
throw new ArcanistUsageException(
|
throw new ArcanistUsageException(
|
||||||
'Cannot display current version without having `git` installed.');
|
pht(
|
||||||
|
'Cannot display current version without having `%s` installed.',
|
||||||
|
'git'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$roots = array(
|
$roots = array(
|
||||||
|
@ -45,13 +47,17 @@ EOTEXT
|
||||||
$configuration_manager);
|
$configuration_manager);
|
||||||
|
|
||||||
if (!Filesystem::pathExists($repository->getMetadataPath())) {
|
if (!Filesystem::pathExists($repository->getMetadataPath())) {
|
||||||
throw new ArcanistUsageException("{$lib} is not a git working copy.");
|
throw new ArcanistUsageException(
|
||||||
|
pht(
|
||||||
|
'%s is not a git working copy.',
|
||||||
|
$lib));
|
||||||
}
|
}
|
||||||
|
|
||||||
list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct');
|
list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct');
|
||||||
list($commit, $timestamp) = explode(' ', $stdout);
|
list($commit, $timestamp) = explode(' ', $stdout);
|
||||||
|
|
||||||
$console->writeOut("%s %s (%s)\n",
|
$console->writeOut(
|
||||||
|
"%s %s (%s)\n",
|
||||||
$lib,
|
$lib,
|
||||||
$commit,
|
$commit,
|
||||||
date('j M Y', (int)$timestamp));
|
date('j M Y', (int)$timestamp));
|
||||||
|
|
Loading…
Reference in a new issue