This commit is contained in:
Danny McCormick
2019-08-12 12:14:43 -04:00
parent 3280df5864
commit db362d751e
4 changed files with 27 additions and 3 deletions

View File

@ -29,6 +29,7 @@ function run() {
let version = core.getInput('version');
if (!version) {
// Try to fall back to global.json
core.debug('No version found, trying to find version from global.json');
const globalJsonPath = path.join(process.cwd(), 'global.json');
if (fs.existsSync(globalJsonPath)) {
const globalJson = JSON.parse(fs.readFileSync(globalJsonPath, { encoding: 'utf8' }));
@ -50,4 +51,5 @@ function run() {
}
});
}
exports.run = run;
run();