Merge pull request #4815 from adamdmharvey/tweak-techdocs
chore(techdocs-common): Improve deprecation warning and change temp folder creation
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
'@backstage/techdocs-common': patch
|
||||
---
|
||||
|
||||
- Improve deprecation warning messaging in logs.
|
||||
- Replace temp folder path from git provider domain(`source`) to full git host name (`resource`). (See: https://github.com/IonicaBizau/git-url-parse#giturlparseurl)
|
||||
@@ -107,7 +107,7 @@ export const getGitRepositoryTempFolder = async (
|
||||
// fs.realpathSync fixes a problem with macOS returning a path that is a symlink
|
||||
fs.realpathSync(os.tmpdir()),
|
||||
'backstage-repo',
|
||||
parsedGitLocation.source,
|
||||
parsedGitLocation.resource,
|
||||
parsedGitLocation.owner,
|
||||
parsedGitLocation.name,
|
||||
parsedGitLocation.ref,
|
||||
|
||||
@@ -40,9 +40,9 @@ export class CommonGitPreparer implements PreparerBase {
|
||||
options?: { etag?: string },
|
||||
): Promise<PreparerResponse> {
|
||||
this.logger.warn(
|
||||
'You are using the legacy git preparer in TechDocs which will be removed in near future (March 2021). ' +
|
||||
'Migrate to URL reader by updating `backstage.io/techdocs-ref` annotation in `catalog-info.yaml` ' +
|
||||
'to be prefixed with `url:`. Read the migration guide and benefits at https://github.com/backstage/backstage/issues/4409 ',
|
||||
`You are using the legacy git preparer in TechDocs for \`${entity.metadata.name}\` which will be removed in near future (March 2021). ` +
|
||||
`Migrate to URL reader by updating \`backstage.io/techdocs-ref\` annotation in \`catalog-info.yaml\` ` +
|
||||
`to be prefixed with \`url:\`. Read the migration guide and benefits at https://github.com/backstage/backstage/issues/4409 `,
|
||||
);
|
||||
|
||||
const { target } = parseReferenceAnnotation(
|
||||
|
||||
Reference in New Issue
Block a user