diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad9fc56ec..029676a3f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -186,6 +186,9 @@ jobs: - name: Regenerate KnownTranslation APIs run: php build/generate-known-translation-apis.php + - name: Regenerate BedrockData available files constants + run: php build/generate-bedrockdata-path-consts.php + - name: Verify code is unchanged run: | git diff diff --git a/build/generate-bedrockdata-path-consts.php b/build/generate-bedrockdata-path-consts.php new file mode 100644 index 000000000..31e23c9b6 --- /dev/null +++ b/build/generate-bedrockdata-path-consts.php @@ -0,0 +1,128 @@ + $fileName){ + fwrite($output, "\tpublic const " . constantify($fileName) . " = BEDROCK_DATA_PATH . '/$fileName';\n"); +} + +fwrite($output, "}\n"); +fclose($output); + +echo "Done. Don't forget to run CS fixup after generating code.\n"; diff --git a/src/data/bedrock/BedrockDataFiles.php b/src/data/bedrock/BedrockDataFiles.php new file mode 100644 index 000000000..731c91120 --- /dev/null +++ b/src/data/bedrock/BedrockDataFiles.php @@ -0,0 +1,54 @@ +