mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-26 13:23:05 +07:00
Build index.js
This commit is contained in:
parent
7323c4e7cb
commit
b66058b059
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -7853,16 +7853,14 @@ function run() {
|
|||||||
}
|
}
|
||||||
exports.run = run;
|
exports.run = run;
|
||||||
function getVersionFromGlobalJson(globalJsonPath) {
|
function getVersionFromGlobalJson(globalJsonPath) {
|
||||||
var _a;
|
|
||||||
const optionValues = ['latestFeature', 'latestPatch'];
|
|
||||||
let version = '';
|
let version = '';
|
||||||
const globalJson = JSON.parse(
|
const globalJson = JSON.parse(
|
||||||
// .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649
|
// .trim() is necessary to strip BOM https://github.com/nodejs/node/issues/20649
|
||||||
fs.readFileSync(globalJsonPath, { encoding: 'utf8' }).trim());
|
fs.readFileSync(globalJsonPath, { encoding: 'utf8' }).trim());
|
||||||
if (globalJson.sdk && globalJson.sdk.version) {
|
if (globalJson.sdk && globalJson.sdk.version) {
|
||||||
version = globalJson.sdk.version;
|
version = globalJson.sdk.version;
|
||||||
const rollForward = (_a = globalJson.sdk.rollForward) !== null && _a !== void 0 ? _a : '';
|
const rollForward = globalJson.sdk.rollForward;
|
||||||
if (optionValues.includes(rollForward)) {
|
if (rollForward && rollForward === 'latestFeature') {
|
||||||
const [major, minor] = version.split('.');
|
const [major, minor] = version.split('.');
|
||||||
version = `${major}.${minor}`;
|
version = `${major}.${minor}`;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user