use ACTIONS_STEP_DEBUG to determine debug mode, use isTrueString lib function
This commit is contained in:
parent
adb7826676
commit
cd3f3c67f2
77
dist/index.js
vendored
77
dist/index.js
vendored
@ -30753,7 +30753,7 @@ module.exports = parseParams
|
||||
/************************************************************************/
|
||||
/******/ // The module cache
|
||||
/******/ var __webpack_module_cache__ = {};
|
||||
/******/
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __nccwpck_require__(moduleId) {
|
||||
/******/ // Check if module is in cache
|
||||
@ -30767,7 +30767,7 @@ module.exports = parseParams
|
||||
/******/ // no module.loaded needed
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ var threw = true;
|
||||
/******/ try {
|
||||
@ -30776,12 +30776,11 @@ module.exports = parseParams
|
||||
/******/ } finally {
|
||||
/******/ if(threw) delete __webpack_module_cache__[moduleId];
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
|
||||
/******/
|
||||
/******/
|
||||
/************************************************************************/
|
||||
/******/ /* webpack/runtime/make namespace object */
|
||||
/******/ (() => {
|
||||
@ -30793,11 +30792,11 @@ module.exports = parseParams
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/
|
||||
/******/ /* webpack/runtime/compat */
|
||||
/******/
|
||||
/******/
|
||||
/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/";
|
||||
/******/
|
||||
/******/
|
||||
/************************************************************************/
|
||||
var __webpack_exports__ = {};
|
||||
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
||||
@ -30806,16 +30805,16 @@ var __webpack_exports__ = {};
|
||||
// ESM COMPAT FLAG
|
||||
__nccwpck_require__.r(__webpack_exports__);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
||||
var github = __nccwpck_require__(5438);
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/github/lib/github.js
|
||||
var github = __nccwpck_require__(5438);
|
||||
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
||||
var core = __nccwpck_require__(2186);
|
||||
;// CONCATENATED MODULE: external "process"
|
||||
const external_process_namespaceObject = require("process");
|
||||
;// CONCATENATED MODULE: ./src/lib.js
|
||||
;// CONCATENATED MODULE: ./src/lib.js
|
||||
|
||||
|
||||
function result_to_output(results) {
|
||||
function result_to_output(results) {
|
||||
for (const key in results) {
|
||||
if (!results.hasOwnProperty(key)) {
|
||||
continue;
|
||||
@ -30828,12 +30827,22 @@ const external_process_namespaceObject = require("process");
|
||||
core.setOutput(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./src/collect_ci.js
|
||||
function isTrueString(str) {
|
||||
return str === '1'
|
||||
|| str === 'true'
|
||||
|| str === 'True'
|
||||
|| str === 'TRUE';
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./src/collect_ci.js
|
||||
|
||||
|
||||
function collect_ci(debug = false, output = false) {
|
||||
|
||||
|
||||
|
||||
function collect_ci(debug = false, output = false) {
|
||||
const r = {
|
||||
ci_hostname: false
|
||||
};
|
||||
@ -30856,7 +30865,7 @@ const external_process_namespaceObject = require("process");
|
||||
core.setFailed(error.message);
|
||||
external_process_namespaceObject.exit(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/semver-parser/modules/common.js
|
||||
/**
|
||||
@ -31129,15 +31138,20 @@ const promises = {
|
||||
*/
|
||||
|
||||
|
||||
;// CONCATENATED MODULE: ./src/collect_git.js
|
||||
|
||||
;// CONCATENATED MODULE: ./src/collect_git.js
|
||||
|
||||
|
||||
function collect_git(debug = false, output = false) {
|
||||
|
||||
|
||||
|
||||
|
||||
function collect_git(debug = false, output = false) {
|
||||
const r = {
|
||||
git_is_branch : false,
|
||||
git_is_tag : false,
|
||||
git_is_pull_request: false,
|
||||
git_current_branch: false,
|
||||
git_is_pull_request : false,
|
||||
git_current_branch : false,
|
||||
git_ref_branch : false,
|
||||
git_is_default_branch: false,
|
||||
git_tag : false,
|
||||
@ -31239,21 +31253,32 @@ const promises = {
|
||||
;// CONCATENATED MODULE: ./src/index.js
|
||||
|
||||
|
||||
function collect_all(debug = false, output = false) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function collect_all(debug = false, output = false) {
|
||||
|
||||
if (debug) {
|
||||
console.log(JSON.stringify(github.context, null, 2));
|
||||
}
|
||||
|
||||
collect_ci(debug, output);
|
||||
collect_git(debug, output);
|
||||
}
|
||||
return {
|
||||
...collect_ci(debug, output),
|
||||
...collect_git(debug, output)
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
;// CONCATENATED MODULE: ./src/action.js
|
||||
;// CONCATENATED MODULE: ./src/action.js
|
||||
|
||||
|
||||
collect_all(true, true);
|
||||
|
||||
const debug = isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
||||
|
||||
collect_all(debug, true);
|
||||
|
||||
})();
|
||||
|
||||
|
||||
6365
package-lock.json
generated
6365
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
import {collect_all} from './index';
|
||||
import {isTrueString} from './lib';
|
||||
|
||||
const debug = process.env['ACTIONS_STEP_DEBUG'] === '1' || process.env['ACTIONS_STEP_DEBUG'] === 'true';
|
||||
const debug = isTrueString(process.env['ACTIONS_STEP_DEBUG']);
|
||||
|
||||
collect_all(debug, true);
|
||||
|
||||
@ -14,3 +14,10 @@ export function result_to_output(results) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function isTrueString(str) {
|
||||
return str === '1'
|
||||
|| str === 'true'
|
||||
|| str === 'True'
|
||||
|| str === 'TRUE';
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user