From 8ac7dd19c82cc1135ac0ed99346d03b6f016a571 Mon Sep 17 00:00:00 2001 From: Jialecl Date: Tue, 21 May 2024 13:22:59 +0200 Subject: [PATCH] Fixed publish release workflow --- scripts/create-version.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/create-version.js b/scripts/create-version.js index 76cacec45..af3736ab4 100644 --- a/scripts/create-version.js +++ b/scripts/create-version.js @@ -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; }); };