Skip to content

Commit c25611b

Browse files
authored
Merge branch 'dev/patch' into feature/brush-level
2 parents 3409f18 + f208227 commit c25611b

36 files changed

Lines changed: 562 additions & 280 deletions

.github/workflows/archive-docs.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,43 @@ name: Archive documentation
22

33
on:
44
release:
5-
types: [published]
5+
types: [ published ]
66
workflow_dispatch:
77

88
jobs:
99
archive-docs:
10-
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
11-
runs-on: ubuntu-latest
12-
steps:
13-
- name: Configure workflow
14-
id: configuration
15-
run: |
16-
echo "BRANCH_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
17-
echo "DOCS_OUTPUT_DIR=${GITHUB_WORKSPACE}/skript-docs/docs/archives/${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
18-
echo "DOCS_REPO_DIR=${GITHUB_WORKSPACE}/skript-docs" >> $GITHUB_OUTPUT
19-
echo "SKRIPT_REPO_DIR=${GITHUB_WORKSPACE}/skript" >> $GITHUB_OUTPUT
20-
- name: Checkout Skript
21-
uses: actions/checkout@v6
22-
with:
23-
submodules: recursive
24-
path: skript
25-
- name: Setup documentation environment
26-
uses: ./skript/.github/workflows/docs/setup-docs
27-
with:
28-
docs_deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
29-
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
30-
- name: Generate documentation
31-
uses: ./skript/.github/workflows/docs/generate-docs
32-
with:
33-
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
34-
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
35-
skript_repo_dir: ${{ steps.configuration.outputs.SKRIPT_REPO_DIR }}
36-
is_release: true
37-
generate_javadocs: true
38-
- name: Push archive documentation
39-
uses: ./skript/.github/workflows/docs/push-docs
40-
with:
41-
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
42-
git_name: Archive Docs Bot
43-
git_email: archivedocs@skriptlang.org
44-
git_commit_message: "Update ${{ steps.configuration.outputs.BRANCH_NAME }} archive docs"
10+
if: "! contains(toJSON(github.event.commits.*.message), '[ci skip]')"
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Configure workflow
14+
id: configuration
15+
run: |
16+
echo "BRANCH_NAME=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
17+
echo "DOCS_OUTPUT_DIR=${GITHUB_WORKSPACE}/skript-docs/docs/archives/${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
18+
echo "DOCS_REPO_DIR=${GITHUB_WORKSPACE}/skript-docs" >> $GITHUB_OUTPUT
19+
echo "SKRIPT_REPO_DIR=${GITHUB_WORKSPACE}/skript" >> $GITHUB_OUTPUT
20+
- name: Checkout Skript
21+
uses: actions/checkout@v6
22+
with:
23+
submodules: recursive
24+
path: skript
25+
- name: Setup documentation environment
26+
uses: ./skript/.github/workflows/docs/setup-docs
27+
with:
28+
docs_repo: "SkriptLang/skript-docs"
29+
docs_token: ${{ secrets.DOCS_TOKEN }}
30+
- name: Generate documentation
31+
uses: ./skript/.github/workflows/docs/generate-docs
32+
with:
33+
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
34+
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
35+
skript_repo_dir: ${{ steps.configuration.outputs.SKRIPT_REPO_DIR }}
36+
is_release: true
37+
generate_javadocs: true
38+
- name: Push archive documentation
39+
uses: ./skript/.github/workflows/docs/push-docs
40+
with:
41+
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
42+
git_name: Archive Docs Bot
43+
git_email: archivedocs@skriptlang.org
44+
git_commit_message: "Update ${{ steps.configuration.outputs.BRANCH_NAME }} archive docs"

.github/workflows/cleanup-docs.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ jobs:
1717
- name: Checkout Skript
1818
uses: actions/checkout@v6
1919
with:
20-
ref: ${{ github.event.repository.default_branch }}
21-
submodules: recursive
22-
path: skript
20+
ref: ${{ github.event.repository.default_branch }}
21+
submodules: recursive
22+
path: skript
2323
- name: Setup documentation environment
2424
uses: ./skript/.github/workflows/docs/setup-docs
2525
with:
26-
docs_deploy_key: ${{ secrets.DOCS_DEPLOY_KEY }}
27-
docs_output_dir: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
26+
docs_repo: "SkriptLang/skript-docs"
27+
docs_token: ${{ secrets.DOCS_TOKEN }}
2828
- name: Cleanup nightly documentation
2929
env:
3030
DOCS_OUTPUT_DIR: ${{ steps.configuration.outputs.DOCS_OUTPUT_DIR }}
@@ -33,7 +33,7 @@ jobs:
3333
- name: Push nightly documentation cleanup
3434
uses: ./skript/.github/workflows/docs/push-docs
3535
with:
36-
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
37-
git_name: Nightly Docs Bot
38-
git_email: nightlydocs@skriptlang.org
39-
git_commit_message: "Delete ${{ steps.configuration.outputs.BRANCH_NAME }} branch nightly docs"
36+
docs_repo_dir: ${{ steps.configuration.outputs.DOCS_REPO_DIR }}
37+
git_name: Nightly Docs Bot
38+
git_email: nightlydocs@skriptlang.org
39+
git_commit_message: "Delete ${{ steps.configuration.outputs.BRANCH_NAME }} branch nightly docs"

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ org.gradle.parallel=true
55

66
groupid=ch.njol
77
name=skript
8-
version=2.14.1
8+
version=2.14.3
99
jarName=Skript.jar
1010
testEnv=java21/paper-1.21.11
1111
testEnvJavaVersion=21

gradlew.bat

Lines changed: 93 additions & 93 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/ch/njol/skript/ScriptLoader.java

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,15 +1064,34 @@ public static ArrayList<TriggerItem> loadItems(SectionNode node) {
10641064

10651065
if (item != null)
10661066
break find_section;
1067-
Collection<LogEntry> errors = handler.getErrors();
10681067

10691068
// restore the failure log if:
10701069
// 1. there are no errors from the statement parse
10711070
// 2. the error message is the default one from the statement parse
10721071
// 3. the backup log contains a message about the section being claimed
1073-
if (errors.isEmpty()
1074-
|| errors.iterator().next().getMessage().contains("Can't understand this condition/effect:")
1075-
|| backup.getErrors().iterator().next().getMessage().contains("tried to claim the current section, but it was already claimed by")
1072+
// 4. the backup log contains an explicit error and the current error message is about no syntax managing the section
1073+
if (!handler.hasErrors()) {
1074+
handler.restore(backup);
1075+
continue;
1076+
}
1077+
1078+
LogEntry errorEntry = handler.getFirstError();
1079+
assert errorEntry != null;
1080+
String error = errorEntry.getMessage();
1081+
1082+
if (error.contains("Can't understand this condition/effect:")) {
1083+
handler.restore(backup);
1084+
continue;
1085+
}
1086+
1087+
LogEntry backupErrorEntry = backup.getFirstError();
1088+
if (backupErrorEntry == null)
1089+
continue;
1090+
String backupError = backupErrorEntry.getMessage();
1091+
1092+
if (backupError.contains("tried to claim the current section, but it was already claimed by")
1093+
|| (!backupError.contains("Can't understand this section: ")
1094+
&& error.contains("is a valid statement but cannot function as a section (:) because there is no syntax in the line to manage it."))
10761095
) {
10771096
handler.restore(backup);
10781097
}

0 commit comments

Comments
 (0)