Skip to content
This repository was archived by the owner on Jan 31, 2023. It is now read-only.

Commit 87b60bc

Browse files
committed
Handle rmtools branch guess through a short path
1 parent 4936f1d commit 87b60bc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/php/libsdk/SDK/Config.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ public static function guessCurrentBranchName() : ?string
183183
$branch = NULL;
184184
$found = false;
185185

186+
$rmtools_branch = getenv("PHP_RMTOOLS_PHP_BUILD_BRANCH");
187+
if ("master" == $rmtools_branch) {
188+
return "master";
189+
}
190+
186191
/* Try to figure out the branch. The worky scenarios are
187192
- CWD is in php-src
188193
- phpize is on the path
@@ -218,9 +223,6 @@ public static function guessCurrentBranchName() : ?string
218223
version, but no dedicated series. For master, it rather
219224
makes sense to use master as branch name. */
220225
$git = trim(shell_exec("where git.exe"));
221-
if (!$git && is_executable('c:\apps\git\bin\git.exe')) {
222-
$git = 'c:\apps\git\bin\git.exe';
223-
}
224226
if ($git && is_dir(".git")) {
225227
$cmd = "\"$git\" branch";
226228

0 commit comments

Comments
 (0)