]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Create v2 libraries
authorvrana <jakubv@fb.com>
Wed, 22 Aug 2012 22:27:13 +0000 (15:27 -0700)
committervrana <jakubv@fb.com>
Wed, 22 Aug 2012 22:43:54 +0000 (15:43 -0700)
Summary:
This is how it looks like now:

>     What do you want to name this library? x
> Writing '__phutil_library_init__.php' to 'x/__phutil_library_init__.php'...
> Usage Exception: This library is using libphutil v1, which is no longer supported. Run 'arc liberate --upgrade' to upgrade to v2.

Test Plan:
  $ arc liberate # in new dir

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3368

src/workflow/ArcanistLiberateWorkflow.php

index b2713c7695eb0d09a8733b0f8d97e99b5e1ee4f1..3b63d100ad0f48ec4546c0450d0e3e4e93bc257d 100644 (file)
@@ -122,6 +122,7 @@ EOTEXT
         echo "No library currently exists at that path...\n";
         $this->liberateCreateDirectory($path);
         $this->liberateCreateLibrary($path);
+        return;
       }
     }
 
@@ -227,8 +228,9 @@ EOTEXT
       "<?php\n\n".
       "phutil_register_library('{$name}', __FILE__);\n";
 
-    echo "Writing '__phutil_library_init__.php' to '{$init_path}'...\n";
+    echo "Writing '__phutil_library_init__.php' to '{$path}'...\n";
     Filesystem::writeFile($init_path, $template);
+    $this->liberateVersion2($path);
   }