From 34d3c2fbba93dce2c062285cdde00079d0b18fe7 Mon Sep 17 00:00:00 2001 From: ilbertt Date: Thu, 14 Aug 2025 17:40:13 +0200 Subject: [PATCH] fix: versions.json correct path --- actions/assemble-docs/dist/index.js | 11 ++++++----- actions/assemble-docs/src/main.ts | 12 ++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/actions/assemble-docs/dist/index.js b/actions/assemble-docs/dist/index.js index cc4ba5f..2e46aa0 100644 --- a/actions/assemble-docs/dist/index.js +++ b/actions/assemble-docs/dist/index.js @@ -19219,6 +19219,11 @@ async function run() { const versionLabel = (0, import_action_utils2.getOptInput)("version_label", version2); const targetDir = (0, import_action_utils2.getInput)("target_dir"); const targetZipFile = import_node_path.default.join(process.cwd(), targetDir, `${version2}.zip`); + const targetVersionsJsonFile = import_node_path.default.join( + process.cwd(), + targetDir, + VERSIONS_JSON_FILE_NAME + ); if (!isValidVersion(version2)) { throw new Error( `Invalid version '${version2}'. ${ALLOWED_VERSIONS_MESSAGE}` @@ -19231,14 +19236,10 @@ async function run() { absoluteSrcPath: assetsDir, absoluteDestPath: targetZipFile }); - const versionsJsonPath = import_node_path.default.resolve( - process.cwd(), - VERSIONS_JSON_FILE_NAME - ); if (isVersionListedInVersionsJson(version2)) { core.info(`Upserting versions.json for version ${version2}`); await upsertVersionsJson({ - versionsJsonPath, + versionsJsonPath: targetVersionsJsonFile, version: version2, versionLabel }); diff --git a/actions/assemble-docs/src/main.ts b/actions/assemble-docs/src/main.ts index fbfa0e7..c5e8444 100644 --- a/actions/assemble-docs/src/main.ts +++ b/actions/assemble-docs/src/main.ts @@ -17,6 +17,11 @@ export async function run(): Promise { const versionLabel = getOptInput('version_label', version); const targetDir = getInput('target_dir'); const targetZipFile = path.join(process.cwd(), targetDir, `${version}.zip`); + const targetVersionsJsonFile = path.join( + process.cwd(), + targetDir, + VERSIONS_JSON_FILE_NAME, + ); if (!isValidVersion(version)) { throw new Error( @@ -33,15 +38,10 @@ export async function run(): Promise { absoluteDestPath: targetZipFile, }); - const versionsJsonPath = path.resolve( - process.cwd(), - VERSIONS_JSON_FILE_NAME, - ); - if (isVersionListedInVersionsJson(version)) { core.info(`Upserting versions.json for version ${version}`); await upsertVersionsJson({ - versionsJsonPath, + versionsJsonPath: targetVersionsJsonFile, version, versionLabel, });