Commit: 073975a5a8e1401cbb21e0d6a1744816d4cd9042 Author: Anatol Belski <[email protected]> Tue, 19 Sep 2017 23:02:23 +0200 Parents: 433bd0a90d8f0f89cecbdad37c81c1867087bdbf Branches: master
Link: http://git.php.net/?p=web/rmtools.git;a=commitdiff;h=073975a5a8e1401cbb21e0d6a1744816d4cd9042 Log: Last exported revision should not be rebuilt Changed paths: M include/Branch.php M script/snap.php Diff: diff --git a/include/Branch.php b/include/Branch.php index 4bb86a5..323e16c 100644 --- a/include/Branch.php +++ b/include/Branch.php @@ -276,6 +276,11 @@ class Branch { return $target; } + public function getLastCommitId() + { + return $this->repo->getLastCommitId(); + } + public function createSourceSnap($build_type = false, $revision = false) { return $this->export($revision, $build_type, true); diff --git a/script/snap.php b/script/snap.php index 234f821..2f0db45 100644 --- a/script/snap.php +++ b/script/snap.php @@ -39,7 +39,9 @@ $branch_name_short = $branch->config->getBranch(); echo "Running <" . realpath($config_path) . ">\n"; echo "\t$branch_name\n"; -if ($branch->hasNewRevision() || $branch->hasUnfinishedBuild() || $force) { +var_dump($branch->hasNewRevision(), !$branch->isLastRevisionExported($branch->getLastCommitId()) && $branch->hasUnfinishedBuild()); + +if ($branch->hasNewRevision() || !$branch->isLastRevisionExported($branch->getLastCommitId()) && $branch->hasUnfinishedBuild()|| $force) { try { if (!$branch->update("all" == $build_type ? NULL : $build_type)) { -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
