Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
Signed-off-by: Shakar Bakr <[email protected]>
  • Loading branch information
5h4k4r committed Oct 1, 2023
1 parent 1e63237 commit 4dfae5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async function run() {
const labelInput = core.getInput('label');

const filePath = getProjectInfoFilePath(filePathInput);
const file = require(filePath);
const file = await getFile(filePath);


console.log(`Label: ${labelInput}`)
Expand Down Expand Up @@ -203,3 +203,8 @@ function updateProjectVersion(filePath, newVersion) {
else if (filePath.match(/package\.json/))
projectInfoFile.version = newVersion;
}

function getFile(filePath) {
const file = fs.readFileSync(filePath, 'utf8');
return file;
}

0 comments on commit 4dfae5a

Please sign in to comment.