fix: build lib
This commit is contained in:
17
lib/main.js
17
lib/main.js
@@ -27,9 +27,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const core = __importStar(require("@actions/core"));
|
||||
const fs = __importStar(require("fs"));
|
||||
const fast_glob_1 = __importDefault(require("fast-glob"));
|
||||
const edits_1 = require("./edits");
|
||||
const { google } = require('googleapis');
|
||||
const auth = new google.auth.GoogleAuth({
|
||||
@@ -110,14 +114,13 @@ function run() {
|
||||
}
|
||||
}
|
||||
else if (releaseFiles.length > 0) {
|
||||
for (const file of releaseFiles) {
|
||||
core.debug(`Validating ${file} exists`);
|
||||
if (!fs.existsSync(file)) {
|
||||
core.setFailed(`Unable to find release file @ ${file}`);
|
||||
return;
|
||||
}
|
||||
core.debug(`Finding files using glob ${releaseFiles}`);
|
||||
const files = yield fast_glob_1.default(releaseFiles);
|
||||
if (!files.length) {
|
||||
core.setFailed(`Unable to find any release file @ ${releaseFiles}`);
|
||||
return;
|
||||
}
|
||||
validatedReleaseFiles = releaseFiles;
|
||||
validatedReleaseFiles = files;
|
||||
}
|
||||
if (whatsNewDir != undefined && whatsNewDir.length > 0 && !fs.existsSync(whatsNewDir)) {
|
||||
core.setFailed(`Unable to find 'whatsnew' directory @ ${whatsNewDir}`);
|
||||
|
||||
Reference in New Issue
Block a user