Page MenuHomePhabricator

D7936.diff
No OneTemporary

D7936.diff

Index: scripts/arcanist.php
===================================================================
--- scripts/arcanist.php
+++ scripts/arcanist.php
@@ -61,7 +61,7 @@
$workflow = null;
try {
-
+ check_arcanist_age($console);
$console->writeLog(
"libphutil loaded from '%s'.\n",
phutil_get_library_root('phutil'));
@@ -552,6 +552,15 @@
}
}
+function check_arcanist_age(PhutilConsole $console) {
+ // Todo: skip if running 'arc upgrade'
+ $arc_dir = dirname(__DIR__);
+ $date = (int) `cd $arc_dir && git log -1 --format=%ct && cd -`;
+ if ($date < time() - (86400 * 30)) {
+ $console->writeOut("<fg:yellow>**Arcanist is more than 30 days out of date."
+ ." You should run 'arc upgrade'.**</fg>\n");
+ }
+}
/**
* NOTE: SPOOKY BLACK MAGIC

File Metadata

Mime Type
text/plain
Expires
Tue, May 14, 2:50 AM (1 w, 2 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6281237
Default Alt Text
D7936.diff (772 B)

Event Timeline