Skip to content

Commit

Permalink
Pull from latest master of bzflag.org repo for BZDB
Browse files Browse the repository at this point in the history
  • Loading branch information
allejo committed Mar 11, 2023
1 parent c1b431a commit d11ce89
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions scripts/fetch-bzdb-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,13 @@ import { load } from 'js-yaml';
import fetch from 'node-fetch';
import { resolve } from 'path';

// @TODO Update this URL to use the `master` branch when this PR is merged
// https://github.com/BZFlag-Dev/bzflag.org/pull/42
const BZDB_DOCS_URL =
'https://raw.githubusercontent.com/BZFlag-Dev/bzflag.org/docs/bzdb/_data/bzdb_settings.yaml';
// prettier-ignore
const BZDB_DOCS_URL = 'https://raw.githubusercontent.com/BZFlag-Dev/bzflag.org/master/_data/bzdb_settings.yaml';

(async function () {
const rawBody = await (await fetch(BZDB_DOCS_URL)).text();
const json = load(rawBody);
const bzdbTypes: string[] = (json as any)['variables'].map(
(def: any) => def.name,
);
const json: any = load(rawBody);
const bzdbTypes: string[] = json['variables'].map((def: any) => def.name);

writeFileSync(
resolve(__dirname, '..', 'src', 'data', 'bzdb-documention.json'),
Expand Down

0 comments on commit d11ce89

Please sign in to comment.