Add lib files

This commit is contained in:
Danny McCormick 2019-06-21 10:20:05 -04:00
parent 211f0312b0
commit 0981176b25
2 changed files with 6 additions and 19 deletions

View File

@ -74,22 +74,6 @@ class DotnetCoreInstaller {
}
// Prepend the tools path. instructs the agent to prepend for future tasks
core.addPath(toolPath);
try {
let globalToolPath = '';
if (IS_WINDOWS) {
globalToolPath = path.join(process.env.USERPROFILE || '', '.dotnet\\tools');
}
else {
globalToolPath = path.join(process.env.HOME || '', '.dotnet/tools');
}
yield io.mkdirP(globalToolPath);
core.addPath(globalToolPath);
}
catch (error) {
//nop
}
// Set DOTNET_ROOT for dotnet core Apphost to find runtime since it is installed to a non well-known location.
core.exportVariable('DOTNET_ROOT', toolPath);
});
}
getLocalTool() {
@ -137,7 +121,7 @@ class DotnetCoreInstaller {
});
}
if (resultCode != 0) {
throw `Failed to detect os with result code ${resultCode}`;
throw `Failed to detect os with result code ${resultCode}. Output: ${output}`;
}
let index;
if ((index = output.indexOf('Primary:')) >= 0) {
@ -190,6 +174,7 @@ class DotnetCoreInstaller {
return __awaiter(this, void 0, void 0, function* () {
let downloadUrls = [];
let releasesJSON = yield this.getReleasesJson();
core.debug('Releases: ' + releasesJSON);
let releasesInfo = JSON.parse(yield releasesJSON.readBody());
releasesInfo = releasesInfo.filter((releaseInfo) => {
return (releaseInfo['version-sdk'] === version ||
@ -285,7 +270,7 @@ class DotnetCoreInstaller {
legacyUrlSearchString = 'dotnet-install: Legacy payload URL: ';
}
if (resultCode != 0) {
throw `Failed to get download urls with result code ${resultCode}`;
throw `Failed to get download urls with result code ${resultCode}. ${output}`;
}
let primaryUrl = '';
let legacyUrl = '';

View File

@ -17,6 +17,7 @@ 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 path = __importStar(require("path"));
function run() {
return __awaiter(this, void 0, void 0, function* () {
try {
@ -30,7 +31,8 @@ function run() {
yield dotnetInstaller.installDotnet();
}
// TODO: setup proxy from runner proxy config
// TODO: problem matchers registered
const matchersPath = path.join(__dirname, '..', '.github');
console.log(`##[add-matcher]${path.join(matchersPath, 'csc.json')}`);
}
catch (error) {
core.setFailed(error.message);