[limb-svn] r6494 - 3.x/trunk/cli

svn at limb-project.com svn at limb-project.com
Tue Nov 6 23:58:01 MSK 2007


Author: pachanga
Date: 2007-11-06 23:58:01 +0300 (Tue, 06 Nov 2007)
New Revision: 6494
URL: http://fisheye.limb-project.com/changelog/limb/?cs=6494

Modified:
   3.x/trunk/cli/publish_package_release.php
Log:
-- minor publish package script improvements

Modified: 3.x/trunk/cli/publish_package_release.php
===================================================================
--- 3.x/trunk/cli/publish_package_release.php	2007-11-06 20:35:44 UTC (rev 6493)
+++ 3.x/trunk/cli/publish_package_release.php	2007-11-06 20:58:01 UTC (rev 6494)
@@ -25,19 +25,19 @@
   chdir($dir);
 
   if(!is_file("./VERSION"))
-    fatal("VERSION file is not present");
+    fatal("VERSION file is not present\n");
 
   list($name, $version) = explode('-', trim(file_get_contents("./VERSION")));
 
   system("php package.php", $res);
 
   if($res != 0)
-    fatal("Package XML creation error");
+    fatal("Package XML creation error\n");
 
   system("pear package", $res);
 
   if($res != 0)
-    fatal("'pear package' failed");
+    fatal("'pear package' failed\n");
 
   unlink("package.xml");
   chdir($old);
@@ -56,7 +56,7 @@
   $page = $curl->post($PEAR, $login_form);
 
   if(preg_match('~Invalid\s+Login~', $page))
-    fatal("Could not login to admin page");
+    fatal("Could not login to admin page\n");
 }
 
 function upload($file)
@@ -73,7 +73,7 @@
   $page = $curl->post($PEAR, $upload_form);
 
   if(!preg_match('~Release\s+successfully\s+saved~', $page))
-     fatal("Could not upload release '$file'");
+     fatal("Could not upload release '$file'\n");
 }
 
 class CURL
@@ -101,6 +101,7 @@
 
   protected function _browserInit()
   {
+    @mkdir(dirname(__FILE__) . '/tmp');
     $this->setOpt(CURLOPT_HEADER, 1);
     $this->setOpt(CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322;)");
     $this->setOpt(CURLOPT_FOLLOWLOCATION, 1);
@@ -129,7 +130,7 @@
     {
       $error = curl_error($this->handle);
       $this->_resetCurl();
-      fatal($error);
+      fatal($error . "\n");
     }
   }
 



More information about the limb-svn mailing list