Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistVersionWorkflow.php
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | foreach ($roots as $lib => $root) { | ||||
| $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( | $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( | ||||
| $configuration_manager); | $configuration_manager); | ||||
| if (!Filesystem::pathExists($repository->getMetadataPath())) { | if (!Filesystem::pathExists($repository->getMetadataPath())) { | ||||
| throw new ArcanistUsageException( | throw new ArcanistUsageException( | ||||
| pht('%s is not a git working copy.', $lib)); | pht('%s is not a git working copy.', $lib)); | ||||
| } | } | ||||
| list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct'); | // NOTE: Carefully execute these commands in a way that works on Windows | ||||
| list($commit, $timestamp) = explode(' ', $stdout); | // until T8298 is properly fixed. See PHI52. | ||||
| list($commit) = $repository->execxLocal('log -1 --format=%%H'); | |||||
| $commit = trim($commit); | |||||
| list($timestamp) = $repository->execxLocal('log -1 --format=%%ct'); | |||||
| $timestamp = trim($timestamp); | |||||
| $console->writeOut( | $console->writeOut( | ||||
| "%s %s (%s)\n", | "%s %s (%s)\n", | ||||
| $lib, | $lib, | ||||
| $commit, | $commit, | ||||
| date('j M Y', (int)$timestamp)); | date('j M Y', (int)$timestamp)); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||