mirror of
https://github.com/ditkrg/project-version-check.git
synced 2026-01-22 22:06:42 +00:00
Update index.js
Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com>
This commit is contained in:
parent
1e63237b51
commit
4dfae5ab3d
7
index.js
7
index.js
@ -14,7 +14,7 @@ async function run() {
|
|||||||
const labelInput = core.getInput('label');
|
const labelInput = core.getInput('label');
|
||||||
|
|
||||||
const filePath = getProjectInfoFilePath(filePathInput);
|
const filePath = getProjectInfoFilePath(filePathInput);
|
||||||
const file = require(filePath);
|
const file = await getFile(filePath);
|
||||||
|
|
||||||
|
|
||||||
console.log(`Label: ${labelInput}`)
|
console.log(`Label: ${labelInput}`)
|
||||||
@ -203,3 +203,8 @@ function updateProjectVersion(filePath, newVersion) {
|
|||||||
else if (filePath.match(/package\.json/))
|
else if (filePath.match(/package\.json/))
|
||||||
projectInfoFile.version = newVersion;
|
projectInfoFile.version = newVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getFile(filePath) {
|
||||||
|
const file = fs.readFileSync(filePath, 'utf8');
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user