mirror of
https://github.com/actions/github-script.git
synced 2026-02-08 12:07:26 +00:00
Added helper
This commit is contained in:
parent
0fdfdff59e
commit
b1c1024769
2 changed files with 29 additions and 1 deletions
13
dist/index.js
vendored
13
dist/index.js
vendored
|
|
@ -6087,7 +6087,10 @@ function onceStrict (fn) {
|
||||||
__webpack_require__.r(__webpack_exports__);
|
__webpack_require__.r(__webpack_exports__);
|
||||||
var se_namespaceObject = {};
|
var se_namespaceObject = {};
|
||||||
__webpack_require__.r(se_namespaceObject);
|
__webpack_require__.r(se_namespaceObject);
|
||||||
|
__webpack_require__.d(se_namespaceObject, "Helper", function() { return Helper; });
|
||||||
__webpack_require__.d(se_namespaceObject, "createMetaJson", function() { return createMetaJson; });
|
__webpack_require__.d(se_namespaceObject, "createMetaJson", function() { return createMetaJson; });
|
||||||
|
__webpack_require__.d(se_namespaceObject, "helper", function() { return helper; });
|
||||||
|
__webpack_require__.d(se_namespaceObject, "setHelper", function() { return setHelper; });
|
||||||
|
|
||||||
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
// EXTERNAL MODULE: ./node_modules/@actions/core/lib/core.js
|
||||||
var core = __webpack_require__(186);
|
var core = __webpack_require__(186);
|
||||||
|
|
@ -6183,8 +6186,18 @@ var external_fs_ = __webpack_require__(747);
|
||||||
// CONCATENATED MODULE: ./src/se.ts
|
// CONCATENATED MODULE: ./src/se.ts
|
||||||
|
|
||||||
|
|
||||||
|
class Helper {
|
||||||
|
constructor(currentBuild) {
|
||||||
|
this.currentBuild = currentBuild;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
let helper;
|
||||||
|
function setHelper(helperInstance) {
|
||||||
|
helper = helperInstance;
|
||||||
|
}
|
||||||
function createMetaJson(root) {
|
function createMetaJson(root) {
|
||||||
const execSync = external_child_process_.execSync;
|
const execSync = external_child_process_.execSync;
|
||||||
|
console.log('Run number: ' + helper.currentBuild.runNumber);
|
||||||
const xmllint = execSync('sudo apt install libxml2-utils', {
|
const xmllint = execSync('sudo apt install libxml2-utils', {
|
||||||
shell: '/bin/bash'
|
shell: '/bin/bash'
|
||||||
});
|
});
|
||||||
|
|
|
||||||
17
src/se.ts
17
src/se.ts
|
|
@ -1,9 +1,24 @@
|
||||||
|
import {context} from '@actions/github'
|
||||||
import * as child from 'child_process'
|
import * as child from 'child_process'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
|
|
||||||
|
export class Helper {
|
||||||
|
public currentBuild: typeof context
|
||||||
|
|
||||||
|
public constructor(currentBuild: typeof context) {
|
||||||
|
this.currentBuild = currentBuild
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export let helper: Helper
|
||||||
|
|
||||||
|
export function setHelper(helperInstance: Helper) {
|
||||||
|
helper = helperInstance
|
||||||
|
}
|
||||||
|
|
||||||
export function createMetaJson(root: string): string[] {
|
export function createMetaJson(root: string): string[] {
|
||||||
const execSync = child.execSync
|
const execSync = child.execSync
|
||||||
|
console.log('Run number: ' + helper.currentBuild.runNumber)
|
||||||
const xmllint = execSync('sudo apt install libxml2-utils', {
|
const xmllint = execSync('sudo apt install libxml2-utils', {
|
||||||
shell: '/bin/bash'
|
shell: '/bin/bash'
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue