Skip to content

Commit 59ee664

Browse files
ilberttnathanosdev
authored andcommitted
fix: versions.json correct path
1 parent cd1fb76 commit 59ee664

2 files changed

Lines changed: 12 additions & 11 deletions

File tree

actions/assemble-docs/dist/index.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19219,6 +19219,11 @@ async function run() {
1921919219
const versionLabel = (0, import_action_utils2.getOptInput)("version_label", version2);
1922019220
const targetDir = (0, import_action_utils2.getInput)("target_dir");
1922119221
const targetZipFile = import_node_path.default.join(process.cwd(), targetDir, `${version2}.zip`);
19222+
const targetVersionsJsonFile = import_node_path.default.join(
19223+
process.cwd(),
19224+
targetDir,
19225+
VERSIONS_JSON_FILE_NAME
19226+
);
1922219227
if (!isValidVersion(version2)) {
1922319228
throw new Error(
1922419229
`Invalid version '${version2}'. ${ALLOWED_VERSIONS_MESSAGE}`
@@ -19231,14 +19236,10 @@ async function run() {
1923119236
absoluteSrcPath: assetsDir,
1923219237
absoluteDestPath: targetZipFile
1923319238
});
19234-
const versionsJsonPath = import_node_path.default.resolve(
19235-
process.cwd(),
19236-
VERSIONS_JSON_FILE_NAME
19237-
);
1923819239
if (isVersionListedInVersionsJson(version2)) {
1923919240
core.info(`Upserting versions.json for version ${version2}`);
1924019241
await upsertVersionsJson({
19241-
versionsJsonPath,
19242+
versionsJsonPath: targetVersionsJsonFile,
1924219243
version: version2,
1924319244
versionLabel
1924419245
});

actions/assemble-docs/src/main.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ export async function run(): Promise<void> {
1717
const versionLabel = getOptInput('version_label', version);
1818
const targetDir = getInput('target_dir');
1919
const targetZipFile = path.join(process.cwd(), targetDir, `${version}.zip`);
20+
const targetVersionsJsonFile = path.join(
21+
process.cwd(),
22+
targetDir,
23+
VERSIONS_JSON_FILE_NAME,
24+
);
2025

2126
if (!isValidVersion(version)) {
2227
throw new Error(
@@ -33,15 +38,10 @@ export async function run(): Promise<void> {
3338
absoluteDestPath: targetZipFile,
3439
});
3540

36-
const versionsJsonPath = path.resolve(
37-
process.cwd(),
38-
VERSIONS_JSON_FILE_NAME,
39-
);
40-
4141
if (isVersionListedInVersionsJson(version)) {
4242
core.info(`Upserting versions.json for version ${version}`);
4343
await upsertVersionsJson({
44-
versionsJsonPath,
44+
versionsJsonPath: targetVersionsJsonFile,
4545
version,
4646
versionLabel,
4747
});

0 commit comments

Comments
 (0)