Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions actions/assemble-docs/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`
Expand All @@ -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
});
Expand Down
12 changes: 6 additions & 6 deletions actions/assemble-docs/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export async function run(): Promise<void> {
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(
Expand All @@ -33,15 +38,10 @@ export async function run(): Promise<void> {
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,
});
Expand Down