Skip to content

Commit

Permalink
initial commit (#938)
Browse files Browse the repository at this point in the history
  • Loading branch information
priya-kinthali authored Sep 6, 2024
1 parent f677139 commit 29a37be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92118,7 +92118,9 @@ function extractValue(obj, keys) {
*/
function getVersionInputFromTomlFile(versionFile) {
core.debug(`Trying to resolve version form ${versionFile}`);
const pyprojectFile = fs_1.default.readFileSync(versionFile, 'utf8');
let pyprojectFile = fs_1.default.readFileSync(versionFile, 'utf8');
// Normalize the line endings in the pyprojectFile
pyprojectFile = pyprojectFile.replace(/\r\n/g, '\n');
const pyprojectConfig = toml.parse(pyprojectFile);
let keys = [];
if ('project' in pyprojectConfig) {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,10 @@ function extractValue(obj: any, keys: string[]): string | undefined {
export function getVersionInputFromTomlFile(versionFile: string): string[] {
core.debug(`Trying to resolve version form ${versionFile}`);

const pyprojectFile = fs.readFileSync(versionFile, 'utf8');
let pyprojectFile = fs.readFileSync(versionFile, 'utf8');
// Normalize the line endings in the pyprojectFile
pyprojectFile = pyprojectFile.replace(/\r\n/g, '\n');

const pyprojectConfig = toml.parse(pyprojectFile);
let keys = [];

Expand Down

0 comments on commit 29a37be

Please sign in to comment.