Skip to content

Commit ae08489

Browse files
authored
chore(scripts): add version history script (#3838)
1 parent 8b31d9e commit ae08489

File tree

10 files changed

+3927
-435
lines changed

10 files changed

+3927
-435
lines changed

config/versions.history.json

Lines changed: 3675 additions & 0 deletions
Large diffs are not rendered by default.

scripts/.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
ignorePatterns: ['**.yml', 'tsconfig.json'],
2+
ignorePatterns: ['**.yml', 'tsconfig.json', 'foo'],
33

44
extends: "../.eslintrc.cjs",
55

scripts/ci/codegen/createGitHubReleases.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

33
import { ensureGitHubToken, getOctokit, OWNER, run, setVerbose, toAbsolutePath } from '../../common';
4-
import { isPreRelease } from '../../release/sla';
4+
import { isPreRelease } from '../../release/versionsHistory';
55
import type { Language } from '../../types';
66
import { cloneRepository } from '../utils';
77

scripts/ci/codegen/pushToAlgoliaDoc.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,6 @@ async function pushToAlgoliaDoc(): Promise<void> {
8686
head: targetBranch,
8787
});
8888

89-
await octokit.issues.createComment({
90-
owner: OWNER,
91-
repo: repository,
92-
issue_number: data.number,
93-
body: [
94-
`[**Preview SLA changes&rarr;**](https://deploy-preview-${data.number}--algolia-docs.netlify.app/doc/libraries/supported-versions/)`,
95-
].join('\n\n'),
96-
});
97-
9889
console.log(`Pull request created on ${OWNER}/${repository}`);
9990
console.log(` > ${data.url}`);
10091
}

scripts/cli/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { formatter } from '../formatter.js';
1111
import { generate } from '../generate.js';
1212
import { playground } from '../playground.js';
1313
import { createReleasePR } from '../release/createReleasePR.js';
14-
import { generateSLA } from '../release/sla.js';
14+
import { generateVersionsHistory } from '../release/versionsHistory.js';
1515
import { snippetsGenerateMany } from '../snippets/generate.js';
1616
import { buildSpecs } from '../specs';
1717
import type { Language } from '../types.js';
@@ -255,13 +255,13 @@ program
255255
undefined,
256256
)
257257
.option('-d, --dry-run', 'does not push anything to GitHub')
258-
.option('-sla, --sla-only', 'only generates the sla policy', false)
258+
.option('-vh, --versions-history', 'only generates the versions-history policy', false)
259259
.option('-b --breaking', 'allow breaking change on the CI', false)
260-
.action(async ({ verbose, releaseType, dryRun, slaOnly, breaking }) => {
260+
.action(async ({ verbose, releaseType, dryRun, versionsHistory, breaking }) => {
261261
setVerbose(Boolean(verbose));
262262

263-
if (slaOnly) {
264-
await generateSLA({});
263+
if (versionsHistory) {
264+
await generateVersionsHistory({});
265265

266266
return;
267267
}

scripts/release/__tests__/sla.test.ts

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

0 commit comments

Comments
 (0)