From 837ce612deca7d7d92c3b6e171876740e59f6a82 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Thu, 18 Feb 2021 21:59:02 +0100 Subject: [PATCH] TechDocs/Publishers: Use path.normalize --- packages/techdocs-common/src/stages/publish/awsS3.ts | 1 + packages/techdocs-common/src/stages/publish/googleStorage.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/techdocs-common/src/stages/publish/awsS3.ts b/packages/techdocs-common/src/stages/publish/awsS3.ts index 50f55ffe91..96cce331ec 100644 --- a/packages/techdocs-common/src/stages/publish/awsS3.ts +++ b/packages/techdocs-common/src/stages/publish/awsS3.ts @@ -149,6 +149,7 @@ export class AwsS3Publish implements PublisherBase { .split(path.sep) .join(path.posix.sep); + // The / delimiter is intentional since it represents the cloud storage and not the local file system. const entityRootDir = `${entity.metadata.namespace}/${entity.kind}/${entity.metadata.name}`; const destination = `${entityRootDir}/${relativeFilePathPosix}`; // S3 Bucket file relative path diff --git a/packages/techdocs-common/src/stages/publish/googleStorage.ts b/packages/techdocs-common/src/stages/publish/googleStorage.ts index f45fb7eafb..e07defb237 100644 --- a/packages/techdocs-common/src/stages/publish/googleStorage.ts +++ b/packages/techdocs-common/src/stages/publish/googleStorage.ts @@ -118,6 +118,7 @@ export class GoogleGCSPublish implements PublisherBase { .split(path.sep) .join(path.posix.sep); + // The / delimiter is intentional since it represents the cloud storage and not the local file system. const entityRootDir = `${entity.metadata.namespace}/${entity.kind}/${entity.metadata.name}`; const destination = `${entityRootDir}/${relativeFilePathPosix}`; // GCS Bucket file relative path