Skip to content

Commit

Permalink
Docs fixed ngl
Browse files Browse the repository at this point in the history
  • Loading branch information
conmaster2112 committed Oct 10, 2024
1 parent c9bd44d commit 99b5977
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 24 deletions.
4 changes: 2 additions & 2 deletions DOCUMENTATION/__MAIN.md
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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`;
Expand Down
28 changes: 8 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -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`;
Expand Down
2 changes: 0 additions & 2 deletions src/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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":""}`;
Expand Down

0 comments on commit 99b5977

Please sign in to comment.