mirror of
https://github.com/php-win-ext/php-sdk-binary-tools.git
synced 2026-03-24 17:12:12 +01:00
Compare commits
1 Commits
php-sdk-2.
...
php-sdk-2.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8aba2baa77 |
@@ -218,7 +218,7 @@ class Config
|
||||
}
|
||||
|
||||
/* Try to figure out the branch. The worky scenarios are
|
||||
- CWD is in php-src
|
||||
- CWD is in php-src
|
||||
- phpize is on the path
|
||||
FIXME for the dev package, there should be a php-config utility
|
||||
*/
|
||||
@@ -256,7 +256,7 @@ class Config
|
||||
$cmd = "\"$git\" branch";
|
||||
|
||||
$ret = trim(shell_exec($cmd));
|
||||
if (preg_match_all(",\*\s+master,", $ret) > 0) {
|
||||
if (preg_match_all(",\*\s+master,", $ret) > 0) {
|
||||
$branch = "master";
|
||||
}
|
||||
}
|
||||
@@ -271,7 +271,7 @@ class Config
|
||||
$branch = self::guessCurrentBranchName();
|
||||
self::setCurrentBranchName($branch);
|
||||
}
|
||||
|
||||
|
||||
return self::$currentBranchName;
|
||||
}/*}}}*/
|
||||
|
||||
@@ -336,7 +336,7 @@ class Config
|
||||
throw new Exception("Failed to find config with arch '" . self::getCurrentArchName() . "'");
|
||||
}
|
||||
|
||||
return $ret;
|
||||
return $ret;
|
||||
}/*}}}*/
|
||||
|
||||
public static function getSdkNugetFeedUrl() : string
|
||||
@@ -368,7 +368,7 @@ class Config
|
||||
throw new Exception("Couldn't find the SDK version file.");
|
||||
}
|
||||
|
||||
return file_get_contents($path);
|
||||
return trim(file_get_contents($path));
|
||||
}/*}}}*/
|
||||
|
||||
public static function getDepsLocalPath() : ?string
|
||||
@@ -391,7 +391,7 @@ class Config
|
||||
self::setDepsLocalPath($tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (NULL == self::$depsLocalPath) {
|
||||
$tmp = realpath("../deps");
|
||||
if (is_dir($tmp)) {
|
||||
|
||||
@@ -94,7 +94,7 @@ trait FileOps
|
||||
throw new Exception("Unable to $cb '$src_path' to '$dst_path'");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -128,7 +128,7 @@ retry:
|
||||
|
||||
if ($dest_fn) {
|
||||
$fd = fopen($dest_fn, "w+");
|
||||
curl_setopt($ch, CURLOPT_FILE, $fd);
|
||||
curl_setopt($ch, CURLOPT_FILE, $fd);
|
||||
} else {
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
}
|
||||
@@ -145,9 +145,8 @@ retry:
|
||||
echo "**** define authorization header ! ****\n";
|
||||
var_dump(curl_setopt($ch, CURLOPT_HTTPHEADER, ['Accept: text/plain','X-custom-header: top1','Authorization: Bearer '.$token]));
|
||||
}
|
||||
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, 'PHP-SDK-BINARY-TOOLS');
|
||||
//curl_setopt($ch, CURLOPT_USERAGENT, Config::getSdkUserAgentName());
|
||||
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, Config::getSdkUserAgentName());
|
||||
|
||||
echo "curl_error=". curl_error($ch) ."\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user