Commit:    83fd08e03965bd4b2feb7df777965936e9591bb7
Author:    Anatol Belski <[email protected]>         Thu, 17 Nov 2016 19:54:54 +0100
Parents:   ea45a221005d9598f5f9a4259f37a6848d8c56d9
Branches:  master

Link:       
http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=83fd08e03965bd4b2feb7df777965936e9591bb7

Log:
fix lock paths

Changed paths:
  M  script/snap.php


Diff:
diff --git a/script/snap.php b/script/snap.php
index c53a451..72ce792 100644
--- a/script/snap.php
+++ b/script/snap.php
@@ -32,17 +32,17 @@ if ($force || $branch->hasNewRevision()) {
                $new_rev = true;
                echo "processing revision $last_rev\n";
                if ($branch->config->getPGO() == 1) {  // Check revision to 
maintain concurrent builds
-                       $fh = 
fopen('c:\php-sdk\locks\snaps_'.$build_type.'.lock', "a");
+                       $fh = fopen(getenv("PHP_RMTOOLS_LOCK_PATH") . 
"/snaps_".$build_type.".lock", "a");
                        fwrite($fh, "$last_rev");
                        fclose($fh);
                        if (strcmp($build_type, 'nts') == 0) {
-                               if 
(!file_exists('c:\php-sdk\locks\snaps_ts.lock'))  {
+                               if 
(!file_exists(getenv("PHP_RMTOOLS_LOCK_PATH") . "/snaps_ts.lock"))  {
                                        echo "Waiting for thread-safe build, 
exiting.\n";
                                        exit(0);
                                }
                                else {
-                                       $fh = 
fopen('c:\php-sdk\locks\snaps_ts.lock', "r");
-                                       $data = fread($fh, 
filesize('c:\php-sdk\locks\snaps_ts.lock'));
+                                       $fh = 
fopen(getenv("PHP_RMTOOLS_LOCK_PATH") . "/snaps_ts.lock", "r");
+                                       $data = fread($fh, 
filesize(getenv("PHP_RMTOOLS_LOCK_PATH") . "/snaps_ts.lock"));
                                        fclose($fh);
                                        if (!preg_match("/$last_rev/", $data)) {
                                                echo "Revision mismatch on 
concurrent builds, waiting for ts build to complete\n";
@@ -92,6 +92,9 @@ if ($force || $branch->hasNewRevision()) {
 
                        $build_src_path = realpath($build_dir_parent) . 
DIRECTORY_SEPARATOR . $build_name;
                        $log = rm\exec_single_log('mklink /J ' . 
$build_src_path . ' ' . $src_original_path);
+                       if (!file_exists($build_src_path)) {
+                               throw new \Exception("Couldn't link 
'$src_original_path' to '$build_src_path'");
+                       }
 
                        $build = $branch->createBuildInstance($build_name);
                        echo "running build in <$build_src_path>\n";


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to