Skip to content

Commit

Permalink
Merge pull request #2001 from dxc-technology/jialecl/version-script-fix
Browse files Browse the repository at this point in the history
Fixed publish release workflow
  • Loading branch information
raquelarrojo authored May 21, 2024
2 parents 376c368 + 8ac7dd1 commit 56464d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/create-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ const setVersion = () => {
version: versionToDeploy,
};
const jsonData = JSON.stringify(object);
fs.writeFile("catalog/version/version.json", jsonData, (err) => {
const versionDirectory = "./catalog/version/";
if (!fs.existsSync(versionDirectory))
fs.mkdirSync(versionDirectory, { recursive: true });
fs.writeFile(`${versionDirectory}version.json`, jsonData, (err) => {
if (err) throw err;
});
};
Expand Down

0 comments on commit 56464d0

Please sign in to comment.