Merge pull request #193 from jaapio/feature/ext-blackfire

🎉 Add blackfire extenstion
This commit is contained in:
Shivam Mathur
2020-02-27 15:50:29 +05:30
committed by GitHub
10 changed files with 230 additions and 0 deletions

47
dist/index.js vendored
View File

@ -1247,6 +1247,17 @@ function suppressOutput(os_version) {
});
}
exports.suppressOutput = suppressOutput;
function getMinorVersion(version) {
return __awaiter(this, void 0, void 0, function* () {
const regex = /^\d+\.\d+/;
const match = version.match(regex);
if (match === null) {
return version;
}
return match[0];
});
}
exports.getMinorVersion = getMinorVersion;
/***/ }),
@ -2706,6 +2717,18 @@ function addExtensionDarwin(extension_csv, version, pipe) {
const prefix = yield utils.getExtensionPrefix(ext_name);
let install_command = '';
switch (true) {
case /^blackfire(-\d+\.\d+\.\d+)?$/.test(extension):
script +=
'\nsh ' +
path.join(__dirname, '../src/scripts/ext/blackfire_darwin.sh') +
' ' +
version +
' ' +
(yield utils.getMinorVersion(version)).replace('.', '');
if (ext_version) {
script += ' ' + ext_version;
}
return;
// match pre-release versions
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
script +=
@ -2787,6 +2810,17 @@ function addExtensionWindows(extension_csv, version, pipe) {
const version_extension = version + extension;
let matches;
switch (true) {
// match blackfire...blackfire-1.31.0
case /^blackfire(-\d+\.\d+\.\d+)?$/.test(extension):
script +=
'\n& ' +
path.join(__dirname, '../src/scripts/ext/blackfire.ps1') +
' ' +
(yield utils.getMinorVersion(version)).replace('.', '');
if (ext_version) {
script += ' ' + ext_version;
}
return;
// match pre-release versions
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
script += '\nAdd-Extension ' + ext_name + ' ' + ext_version;
@ -2840,6 +2874,19 @@ function addExtensionLinux(extension_csv, version, pipe) {
const prefix = yield utils.getExtensionPrefix(ext_name);
let install_command = '';
switch (true) {
// match blackfire... blackfire-1.31.0
case /^blackfire(-\d+\.\d+\.\d+)?$/.test(extension):
script +=
'\nsh ' +
path.join(__dirname, '../src/scripts/ext/blackfire.sh') +
' ' +
version +
' ' +
(yield utils.getMinorVersion(version)).replace('.', '');
if (ext_version) {
script += ' ' + ext_version;
}
return;
// match pre-release versions
case /.*-(beta|alpha|devel|snapshot)/.test(version_extension):
script +=