Implement a command line, configurable rule printer (#1357)
* Implement a command line, configurable rule printer * Update publish action to rule printer * Bump loom and lqf versions
This commit is contained in:
1 parent
1734930f7e
commit
4db1dd8f87
4 files changed
+54
-48
No files matched your search
@@ -157,40 +157,15 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: 17
|
||||
cache: 'gradle'
|
||||
- name: Replace fabric.mod.json
|
||||
run: |
|
||||
cd src/main/resources
|
||||
rm fabric.mod.json
|
||||
echo '
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"id": "carpet",
|
||||
"version": "1.4.36",
|
||||
"entrypoints": {
|
||||
"server": [ "carpet.utils.CarpetRulePrinter" ],
|
||||
"preLaunch": [ "carpet.utils.CarpetRulePrinter" ]
|
||||
}
|
||||
}' > fabric.mod.json
|
||||
cd ../../../
|
||||
- name: Run solution
|
||||
run: |
|
||||
chmod +x gradlew
|
||||
./gradlew runServer > settings-toProccess.txt
|
||||
- name: Checkout wiki
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: ${{github.repository}}.wiki
|
||||
path: wiki
|
||||
- name: Proccess Gradle log into a pretty wiki page
|
||||
- name: Run rule printer into the wiki page
|
||||
run: |
|
||||
from1="# Carpet";
|
||||
File=settings-toProccess.txt
|
||||
if grep -q "Deprecated Gradle features" "$File"; then # Happens after update to Gradle 6
|
||||
to2="Deprecated Gradle features";
|
||||
else
|
||||
to2="BUILD SUCCESSFUL"
|
||||
fi
|
||||
a="$(cat settings-toProccess.txt)"; a="$(echo "${a#*"$from1"}")"; echo "$from1${a%%"$to2"*}" > wiki/Current-Available-Settings.md
|
||||
chmod +x gradlew
|
||||
./gradlew runServer --args="-- -carpetDumpRules -dumpPath ../wiki/Current-Available-Settings.md"
|
||||
- name: Commit updated wiki page
|
||||
continue-on-error: true
|
||||
run: |
|
||||
|
||||
Reference in new issue
Block a user