Improve documentation

This commit is contained in:
Shivam Mathur
2019-10-11 23:09:05 +05:30
parent f7f5b1a7e1
commit 99bbaa2a58
8 changed files with 98 additions and 11 deletions

View File

@ -19,6 +19,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
const utils = __importStar(require("./utils"));
const extensions = __importStar(require("./extensions"));
const config = __importStar(require("./config"));
/**
* Function to set coverage driver
*
* @param coverage_driver
* @param version
* @param os_version
*/
function addCoverage(coverage_driver, version, os_version) {
return __awaiter(this, void 0, void 0, function* () {
coverage_driver.toLowerCase();
@ -35,6 +42,12 @@ function addCoverage(coverage_driver, version, os_version) {
});
}
exports.addCoverage = addCoverage;
/**
* Function to setup Xdebug
*
* @param version
* @param os_version
*/
function addCoverageXdebug(version, os_version) {
return __awaiter(this, void 0, void 0, function* () {
let script = '\n';
@ -44,6 +57,12 @@ function addCoverageXdebug(version, os_version) {
});
}
exports.addCoverageXdebug = addCoverageXdebug;
/**
* Function to setup PCOV
*
* @param version
* @param os_version
*/
function addCoveragePCOV(version, os_version) {
return __awaiter(this, void 0, void 0, function* () {
let script = '\n';
@ -83,6 +102,12 @@ function addCoveragePCOV(version, os_version) {
});
}
exports.addCoveragePCOV = addCoveragePCOV;
/**
* Function to disable Xdebug and PCOV
*
* @param version
* @param os_version
*/
function disableCoverage(version, os_version) {
return __awaiter(this, void 0, void 0, function* () {
let script = '\n';

View File

@ -17,6 +17,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const utils = __importStar(require("./utils"));
/**
* Install and enable extensions
*
* @param extension_csv
* @param version
* @param os_version
* @param log_prefix
*/
function addExtension(extension_csv, version, os_version, log_prefix = 'Add Extension') {
return __awaiter(this, void 0, void 0, function* () {
switch (os_version) {

View File

@ -19,6 +19,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
const fs = __importStar(require("fs"));
const path = __importStar(require("path"));
const core = __importStar(require("@actions/core"));
/**
* Function to get inputs from both with and env annotations.
*
* @param name
* @param mandatory
*/
function getInput(name, mandatory) {
return __awaiter(this, void 0, void 0, function* () {
let input = process.env[name];
@ -117,6 +123,7 @@ function writeScript(filename, version, script) {
exports.writeScript = writeScript;
/**
* Function to break extension csv into an array
*
* @param extension_csv
*/
function extensionArray(extension_csv) {
@ -196,6 +203,11 @@ function log(message, os_version, log_type, prefix = '') {
});
}
exports.log = log;
/**
* Function to get prefix required to load an extension.
*
* @param extension
*/
function getExtensionPrefix(extension) {
return __awaiter(this, void 0, void 0, function* () {
let zend = ['xdebug', 'opcache', 'ioncube', 'eaccelerator'];