Skip to content

Commit 9a3979a

Browse files
authored
Revert "docs: resolve artifact versions in installation snippets" (#121)
1 parent 8578b4b commit 9a3979a

3 files changed

Lines changed: 0 additions & 213 deletions

File tree

‎docs-app/lib/artifact-version.cjs‎

Lines changed: 0 additions & 57 deletions
This file was deleted.

‎docs-app/lib/artifact-version.test.mjs‎

Lines changed: 0 additions & 139 deletions
This file was deleted.

‎docs-app/lib/content.ts‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ import matter from 'gray-matter';
44
import { DocPage, DocVersion, NavItem, PageFrontmatter } from './types';
55
import { createHeadingSlugger, slugifyHeading } from './anchors';
66
import { getAllVersions, getVersion } from './versions';
7-
import artifactVersion from './artifact-version.cjs';
87

98
/**
109
* Base path to wiki content
1110
*/
1211
const CONTENT_BASE = path.join(process.cwd(), '..', 'content');
1312
const RELEASE_NOTES_BASE = path.join(process.cwd(), '..', 'release-notes');
1413
const CURRENT_RELEASE_NOTES_VERSION_PATH = path.join(RELEASE_NOTES_BASE, 'current-version.txt');
15-
const SNAPSHOT_MANIFEST_PATH = path.join(process.cwd(), 'public', 'snapshot-manifest.json');
16-
const { resolveArtifactVersion, resolveKotlinArtifactVersion } = artifactVersion;
1714
const CHANGESETS_DIR_NAME = 'changes';
1815
const MIGRATIONS_DIR_NAME = 'migrations';
1916

@@ -29,18 +26,6 @@ function readTextFile(filePath: string): string {
2926
return fs.readFileSync(/* turbopackIgnore: true */ filePath, 'utf-8');
3027
}
3128

32-
function getArtifactVersion(versionId: string): string | null {
33-
if (versionId !== 'snapshot') {
34-
return resolveArtifactVersion(versionId, '');
35-
}
36-
37-
try {
38-
return resolveArtifactVersion(versionId, readTextFile(SNAPSHOT_MANIFEST_PATH));
39-
} catch {
40-
return null;
41-
}
42-
}
43-
4429
/**
4530
* Get the wiki content directory for a version
4631
*/
@@ -704,8 +689,6 @@ export function getPage(versionId: string, slug: string): DocPage | null {
704689
.replace(/\{\{version\}\}/g, versionId)
705690
.replace(/\{\{versionLabel\}\}/g, versionLabel);
706691

707-
pageContent = resolveKotlinArtifactVersion(pageContent, getArtifactVersion(versionId));
708-
709692
if (slug === '') {
710693
const changesetsMarkdown = renderChangesetsMarkdown(getVersionChangesets(versionId));
711694
if (changesetsMarkdown) {

0 commit comments

Comments
 (0)