built done for changes

This commit is contained in:
Hargun Kaur 2021-10-07 17:22:47 +00:00 committed by GitHub
parent aa06bd5a2d
commit 3f779ed5d2
2 changed files with 20 additions and 16 deletions

31
dist/setup/index.js vendored
View file

@ -6849,15 +6849,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
result["default"] = mod; result["default"] = mod;
return result; return result;
}; };
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(__webpack_require__(470)); const core = __importStar(__webpack_require__(470));
const installer = __importStar(__webpack_require__(923)); const installer = __importStar(__webpack_require__(923));
const fs = __webpack_require__(747); const fs_1 = __importDefault(__webpack_require__(747));
const auth = __importStar(__webpack_require__(749)); const auth = __importStar(__webpack_require__(749));
const path = __importStar(__webpack_require__(622)); const path = __importStar(__webpack_require__(622));
const cache_restore_1 = __webpack_require__(409); const cache_restore_1 = __webpack_require__(409);
const url_1 = __webpack_require__(835); const url_1 = __webpack_require__(835);
const os = __webpack_require__(87); const os_1 = __importDefault(__webpack_require__(87));
function run() { function run() {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
@ -6871,8 +6874,8 @@ function run() {
if (!version) { if (!version) {
const versionFile = core.getInput('node-version-file'); const versionFile = core.getInput('node-version-file');
if (!!versionFile) { if (!!versionFile) {
const versionFilePath = path.join(__dirname, '..', versionFile); const versionFilePath = path.join(process.env.GITHUB_WORKSPACE, versionFile);
version = yield installer.parseNodeVersionFile(fs.readFileSync(versionFilePath, 'utf8')); version = installer.parseNodeVersionFile(fs_1.default.readFileSync(versionFilePath, 'utf8'));
core.info(`Resolved ${versionFile} as ${version}`); core.info(`Resolved ${versionFile} as ${version}`);
} }
} }
@ -6885,7 +6888,7 @@ function run() {
core.warning('`architecture` is provided but `node-version` is missing. In this configuration, the version/architecture of Node will not be changed. To fix this, provide `architecture` in combination with `node-version`'); core.warning('`architecture` is provided but `node-version` is missing. In this configuration, the version/architecture of Node will not be changed. To fix this, provide `architecture` in combination with `node-version`');
} }
if (!arch) { if (!arch) {
arch = os.arch(); arch = os_1.default.arch();
} }
if (version) { if (version) {
let token = core.getInput('token'); let token = core.getInput('token');
@ -6911,8 +6914,8 @@ function run() {
core.info(`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`); core.info(`##[add-matcher]${path.join(matchersPath, 'eslint-stylish.json')}`);
core.info(`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`); core.info(`##[add-matcher]${path.join(matchersPath, 'eslint-compact.json')}`);
} }
catch (error) { catch (err) {
core.setFailed(error.message); core.setFailed(err.message);
} }
}); });
} }
@ -65069,8 +65072,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
const os = __webpack_require__(87); const os = __webpack_require__(87);
const assert = __importStar(__webpack_require__(357)); const assert = __importStar(__webpack_require__(357));
const core = __importStar(__webpack_require__(470)); const core = __importStar(__webpack_require__(470));
const io = __importStar(__webpack_require__(1));
const hc = __importStar(__webpack_require__(539)); const hc = __importStar(__webpack_require__(539));
const io = __importStar(__webpack_require__(1));
const tc = __importStar(__webpack_require__(533)); const tc = __importStar(__webpack_require__(533));
const path = __importStar(__webpack_require__(622)); const path = __importStar(__webpack_require__(622));
const semver = __importStar(__webpack_require__(280)); const semver = __importStar(__webpack_require__(280));
@ -65411,13 +65414,11 @@ function translateArchToDistUrl(arch) {
} }
} }
function parseNodeVersionFile(contents) { function parseNodeVersionFile(contents) {
return __awaiter(this, void 0, void 0, function* () { let nodeVersion = contents.trim();
let nodeVersion = contents.trim(); if (/^v\d/.test(nodeVersion)) {
if (/^v\d/.test(nodeVersion)) { nodeVersion = nodeVersion.substring(1);
nodeVersion = nodeVersion.substring(1); }
} return nodeVersion;
return nodeVersion;
});
} }
exports.parseNodeVersionFile = parseNodeVersionFile; exports.parseNodeVersionFile = parseNodeVersionFile;

View file

@ -21,7 +21,10 @@ export async function run() {
const versionFile = core.getInput('node-version-file'); const versionFile = core.getInput('node-version-file');
if (!!versionFile) { if (!!versionFile) {
const versionFilePath = path.join(process.env.GITHUB_WORKSPACE!, versionFile); const versionFilePath = path.join(
process.env.GITHUB_WORKSPACE!,
versionFile
);
version = installer.parseNodeVersionFile( version = installer.parseNodeVersionFile(
fs.readFileSync(versionFilePath, 'utf8') fs.readFileSync(versionFilePath, 'utf8')
); );