mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-22 19:41:08 +07:00
Add lib files
This commit is contained in:
parent
211f0312b0
commit
0981176b25
@ -74,22 +74,6 @@ class DotnetCoreInstaller {
|
|||||||
}
|
}
|
||||||
// Prepend the tools path. instructs the agent to prepend for future tasks
|
// Prepend the tools path. instructs the agent to prepend for future tasks
|
||||||
core.addPath(toolPath);
|
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() {
|
getLocalTool() {
|
||||||
@ -137,7 +121,7 @@ class DotnetCoreInstaller {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (resultCode != 0) {
|
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;
|
let index;
|
||||||
if ((index = output.indexOf('Primary:')) >= 0) {
|
if ((index = output.indexOf('Primary:')) >= 0) {
|
||||||
@ -190,6 +174,7 @@ class DotnetCoreInstaller {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
let downloadUrls = [];
|
let downloadUrls = [];
|
||||||
let releasesJSON = yield this.getReleasesJson();
|
let releasesJSON = yield this.getReleasesJson();
|
||||||
|
core.debug('Releases: ' + releasesJSON);
|
||||||
let releasesInfo = JSON.parse(yield releasesJSON.readBody());
|
let releasesInfo = JSON.parse(yield releasesJSON.readBody());
|
||||||
releasesInfo = releasesInfo.filter((releaseInfo) => {
|
releasesInfo = releasesInfo.filter((releaseInfo) => {
|
||||||
return (releaseInfo['version-sdk'] === version ||
|
return (releaseInfo['version-sdk'] === version ||
|
||||||
@ -285,7 +270,7 @@ class DotnetCoreInstaller {
|
|||||||
legacyUrlSearchString = 'dotnet-install: Legacy payload URL: ';
|
legacyUrlSearchString = 'dotnet-install: Legacy payload URL: ';
|
||||||
}
|
}
|
||||||
if (resultCode != 0) {
|
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 primaryUrl = '';
|
||||||
let legacyUrl = '';
|
let legacyUrl = '';
|
||||||
|
@ -17,6 +17,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const core = __importStar(require("@actions/core"));
|
const core = __importStar(require("@actions/core"));
|
||||||
const installer = __importStar(require("./installer"));
|
const installer = __importStar(require("./installer"));
|
||||||
|
const path = __importStar(require("path"));
|
||||||
function run() {
|
function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
@ -30,7 +31,8 @@ function run() {
|
|||||||
yield dotnetInstaller.installDotnet();
|
yield dotnetInstaller.installDotnet();
|
||||||
}
|
}
|
||||||
// TODO: setup proxy from runner proxy config
|
// 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) {
|
catch (error) {
|
||||||
core.setFailed(error.message);
|
core.setFailed(error.message);
|
||||||
|
Loading…
Reference in New Issue
Block a user