Last active
April 25, 2020 01:18
-
-
Save Roguelazer/5471fbe79a2280ed7af3822c275fff5a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- src/toolset/workflow/ArcanistVersionWorkflow.php.orig 2020-04-24 18:03:45.000000000 -0700 | |
+++ src/toolset/workflow/ArcanistVersionWorkflow.php 2020-04-24 18:17:51.000000000 -0700 | |
@@ -46,35 +46,17 @@ | |
$roots = array( | |
'arcanist' => dirname(phutil_get_library_root('arcanist')), | |
); | |
foreach ($roots as $lib => $root) { | |
- $working_copy = ArcanistWorkingCopy::newFromWorkingDirectory($root); | |
- | |
- $repository_api = $working_copy->getRepositoryAPI(); | |
- $is_git = ($repository_api instanceof ArcanistGitAPI); | |
- | |
- if (!$is_git) { | |
- throw new PhutilArgumentUsageException( | |
- pht( | |
- 'Library "%s" (at "%s") is not a Git working copy, so no version '. | |
- 'information can be provided.', | |
- $lib, | |
- Filesystem::readablePath($root))); | |
- } | |
- | |
- list($commit) = $repository_api->execxLocal( | |
- 'log -1 --format=%s', | |
- '%ct%x01%H'); | |
- $commit = trim($commit); | |
- | |
- list($timestamp, $commit) = explode("\1", $commit); | |
+ $commit = Filesystem::readFile($root . "/VERSION"); | |
$console->writeOut( | |
"%s %s (%s)\n", | |
$lib, | |
$commit, | |
- date('j M Y', (int)$timestamp)); | |
+ 'unknown' | |
+ ); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment