From 99b5977a6fccb83b64c9cb947760a017b9c8d025 Mon Sep 17 00:00:00 2001 From: Documentation Manager Bot <64863757+conmaster2112@users.noreply.github.com> Date: Thu, 10 Oct 2024 16:49:11 +0200 Subject: [PATCH] Docs fixed ngl --- DOCUMENTATION/__MAIN.md | 4 ++-- README.md | 28 ++++++++-------------------- src/functions.js | 2 -- 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/DOCUMENTATION/__MAIN.md b/DOCUMENTATION/__MAIN.md index 2689745..4f2023c 100644 --- a/DOCUMENTATION/__MAIN.md +++ b/DOCUMENTATION/__MAIN.md @@ -1,7 +1,7 @@ # Bedrock Documentation Generator ## Overview -This repository generates documentation for different versions of Bedrock. The generated docs are stored in the `./docs` directory. Before fetching any data, ensure that the data is generated in the specific branch by checking the `exist.json` file in the root directory. This file includes the build version, engine version, and flags indicating the types of generated data. +This repository generates documentation for different versions of Bedrock. The generated docs are stored in the `./metadata` directory. Before fetching any data, ensure that the data is generated in the specific branch by checking the `exist.json` file in the root directory. This file includes the build version, engine version, and flags indicating the types of generated data. ## Checking Generated Data The `exist.json` file is crucial for determining if the necessary data has been generated for a specific branch. This file must be fetched first to verify the existence of the repository and the availability of the required data. It contains: @@ -33,7 +33,7 @@ https://raw.githubusercontent.com/Bedrock-APIs/bds-docs/{branch}/metadata/script Replace `{branch}` with the appropriate branch name (`stable`, `preview`, or `stable-x.x.x`), and `{module_name}` and `{module_version}` with the specific module name and version. ### Specific Stable Version Example -Keep in mind this branch is older and was generated with different flags, thats why we have `/docs/`, in the link and not `/metadata/` +Keep in mind this branch is older and was generated with different flags, thats why we have to use `/docs/` in the link and not `/metadata/` ```js const engine_version = "1.20.10"; `https://raw.githubusercontent.com/Bedrock-APIs/bds-docs/stable-${engine_version}/docs/script_modules/@minecraft/server_1.2.0.json`; diff --git a/README.md b/README.md index cb3a5dd..d8aa840 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,39 @@ # Bedrock Documentation Generator ## Overview -This repository generates documentation for different versions of Bedrock. The generated docs are stored in the `./docs` directory. Before fetching any data, ensure that the data is generated in the specific branch by checking the `exist.json` file in the root directory. This file includes the build version, engine version, and flags indicating the types of generated data. +This repository generates documentation for different versions of Bedrock. The generated docs are stored in the `./metadata` directory. Before fetching any data, ensure that the data is generated in the specific branch by checking the `exist.json` file in the root directory. This file includes the build version, engine version, and flags indicating the types of generated data. ## Checking Generated Data The `exist.json` file is crucial for determining if the necessary data has been generated for a specific branch. This file must be fetched first to verify the existence of the repository and the availability of the required data. It contains: - **version**: The version of the documentation (e.g., x.x.x or x.x.x.x). - **build-version**: The version of BDS used to generate the documentation. -- **flags**: An array indicating the types of content generated. This array may include additional data generated by some flags that are not specified here. +- **flags**: An array indicating the types of content generated. Read specific flags in sections about [Current Generator Flags](#current-flags). These generator flags may generate some additional data directly to `exist.json` root JSON object. All od these things should be described by generator flags in section of [Current Generator Flags](#current-flags). Example of `exist.json`: ```json { "version": "", "build-version": "", - "flags": [] + "flags": [] //string[] } ``` -## Supported Branches +## Versioning You can target specific versions via the following branches: - **Latest Stable**: `stable` - **Latest Preview**: `preview` - **Specific Stable**: `stable-x.x.x` (e.g., `stable-1.20.10`) -## Flags -Flags in the `exist.json` file indicate the types of content generated for that branch. Before fetching any files, check for the appropriate flag to ensure the data exists. Read specific flags in sections about [Current Generator Flags](#current-flags). - ## Targeting Files To fetch the documentation files, use the following URL format: +**Fetching JSON METADATA for specific Script Module** ``` -https://raw.githubusercontent.com/Bedrock-APIs/bds-docs/{branch}/docs/script_modules/@minecraft/{module_name}_{module_version}.json +https://raw.githubusercontent.com/Bedrock-APIs/bds-docs/{branch}/metadata/script_modules/@minecraft/{module_name}_{module_version}.json ``` Replace `{branch}` with the appropriate branch name (`stable`, `preview`, or `stable-x.x.x`), and `{module_name}` and `{module_version}` with the specific module name and version. -## Examples -### Preview Version -```js -`https://raw.githubusercontent.com/Bedrock-APIs/bds-docs/preview/docs/script_modules/@minecraft/server_1.7.0-beta.json`; -``` - -### Stable Version -```js -`https://raw.githubusercontent.com/Bedrock-APIs/bds-docs/stable/docs/script_modules/@minecraft/server_1.2.0.json`; -``` - -### Specific Stable Version +### Specific Stable Version Example +Keep in mind this branch is older and was generated with different flags, thats why we have to use `/docs/` in the link and not `/metadata/` ```js const engine_version = "1.20.10"; `https://raw.githubusercontent.com/Bedrock-APIs/bds-docs/stable-${engine_version}/docs/script_modules/@minecraft/server_1.2.0.json`; diff --git a/src/functions.js b/src/functions.js index 082f7fc..54221c7 100644 --- a/src/functions.js +++ b/src/functions.js @@ -243,8 +243,6 @@ export async function GithubChekoutBranch(branch, force) { console.error(`Fail to execute '${cmd}' command`); return false; } - - await ExecuteCommand("git branch -r -a"); // Basic checkout command execution cmd = `git checkout ${branch}${force?" -f":""}`;