Skip to content

Commit

Permalink
migrate to js action
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireW committed Oct 15, 2024
1 parent b09a714 commit 863c3c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions dblinter-report.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,16 @@ function validateInput(){
exit(1);
}
let filename=reportPathInput;
let directory=".";
if (reportPathInput.includes("/")) {
const tmpStr = reportPathInput.split('/').slice(0, -1).join('/');
directory = reportPathInput.split('/').slice(0, -1).join('/');
filename = reportPathInput.split('/').pop();
if (!fs.existsSync(tmpStr)) {
fs.mkdirSync(tmpStr, { recursive: true });
if (!fs.existsSync(directory)) {
fs.mkdirSync(directory, { recursive: true });
}
}

const reportDir = fs.realpathSync(reportPathInput);
const reportDir = fs.realpathSync(directory);
const reportPath = `${reportDir}/${filename}`;

let flywayMigration = core.getInput('flyway-migration');
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

0 comments on commit 863c3c6

Please sign in to comment.