Add support for node version codename

Refactored for optimization and maintainability
This commit is contained in:
Jimi (Dimitris) Charalampidis 2019-09-13 13:15:45 +03:00
parent 7a3ce83626
commit 62a25ae2c2
No known key found for this signature in database
GPG key ID: 36C7F609B733BD60
10 changed files with 507 additions and 401 deletions

View file

@ -16,20 +16,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
const core = __importStar(require("@actions/core"));
const installer = __importStar(require("./installer"));
const auth = __importStar(require("./authutil"));
const path = __importStar(require("path"));
const auth = __importStar(require("./authutil"));
const installer = __importStar(require("./installer"));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
//
// Version is optional. If supplied, install / use from the tool cache
// Version is optional. If supplied, install / use from the tool cache
// If not supplied then task is still used to setup proxy, auth, etc...
//
let version = core.getInput('version');
if (!version) {
version = core.getInput('node-version');
}
const version = core.getInput('version') || core.getInput('node-version');
// allow user to not specify a node version
if (version) {
// TODO: installer doesn't support proxy
yield installer.getNode(version);