Skip to content

Commit

Permalink
Merge branch 'dev/patch' into dev/feature (#6065)
Browse files Browse the repository at this point in the history
* Fix ExprRandomNumber using a method from Java 17 (#6022)

* Fix changing remaining time of command cooldown (#6021)

Update ScriptCommand.java

Co-authored-by: Moderocky <[email protected]>

* Bump version to 2.7.1 (#5993)

Co-authored-by: Moderocky <[email protected]>

* fix 3 stray INSERT VERSIONs from 2.7.0 (#6027)

correct incorrect values

* Fix Documentation Actions on dev/patch (#6042)

* Tidy up parts of config class. (#6025)

* Add Release Model Document (#6041)

Add release model document

Co-authored-by: Ayham Al Ali <[email protected]>
Co-authored-by: Moderocky <[email protected]>

* (Cherry Pick) Fix cast throwing if existing variable for command storage exists (#5942) (#6026)

Fix cast throwing if existing variable for command storage exists (#5942)

* Fix cast throwing if existing variable for command storage exists

* Update src/main/java/ch/njol/skript/command/ScriptCommand.java



---------

Co-authored-by: LimeGlass <[email protected]>
Co-authored-by: Ayham Al Ali <[email protected]>

* (Cherry Pick) Fix NPE with invalid attributes and clean up ExprEntityAttribute (#5978) (#6023)

Fix NPE with invalid attributes and clean up ExprEntityAttribute (#5978)

* Avoid NPE and clean up class

* Update ExprEntityAttribute.java

* Update src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java



* Update src/main/java/ch/njol/skript/expressions/ExprEntityAttribute.java

---------

Co-authored-by: sovdee <[email protected]>
Co-authored-by: Ayham Al Ali <[email protected]>

* Fix multiple aliases sections not working (#6050)

* Fix error when unloading a script with multiple variables sections (#6047)

* Returns the old 2.6.4 duplicate variables section behaviour.

* Add an error but i don't know what it's for

* Add lots of brackets to keep walrus happy :}}}

* Add load tracker to prevent multiple loading.

* Prevent variable data wipe, fix another bug

* Support IDEs from the dark ages that don't know what a star is and think it orbits the earth or something

* add a test

---------

Co-authored-by: APickledWalrus <[email protected]>

* Bump actions/checkout from 3 to 4 (#6029)

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

* ⚒ Disable Javadocs generation for nightly docs & improvements (#6059)

* Let's see if I am good at GH actions 🤞

* ops!

* Use proper docs template reference when possible

* Disable nightly javadocs generation with an option

Each javadoc is ~50mb, which was causing the big size of the docs! while each docs generation is ~2mb only

* Fix building

* Revert pull changes

They are not what fixed the issue, probably the old PRs aren't syncing for some reason

* Update build.gradle

---------

Co-authored-by: Moderocky <[email protected]>

* Change the target branch of dependabot (#6063)

Update dependabot.yml

* Update cleanup-docs.yml

---------

Co-authored-by: LimeGlass <[email protected]>
Co-authored-by: Ayham Al Ali <[email protected]>
  • Loading branch information
3 people authored Sep 24, 2023
1 parent 31e24ad commit f348832
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
version: 2
updates:
- package-ecosystem: "github-actions"
target-branch: "dev/patch"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
- package-ecosystem: "gradle"
target-branch: "dev/patch"
directory: "/"
schedule:
interval: "weekly"
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/docs/generate-docs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ inputs:
required: false
default: "*"
type: string
generate_javadocs:
description: "Designates whether to generate javadocs for this nightly documentation"
required: false
default: false
type: boolean

outputs:
DOCS_CHANGED:
Expand All @@ -41,6 +46,7 @@ runs:
SKRIPT_REPO_DIR: ${{ inputs.skript_repo_dir }}
IS_RELEASE: ${{ inputs.is_release }}
CLEANUP_PATTERN: ${{ inputs.cleanup_pattern }}
GENERATE_JAVADOCS: ${{ inputs.generate_javadocs }}
run: |
replace_in_directory() {
find $1 -type f -exec sed -i -e "s/$2/$3/g" {} \;
Expand All @@ -55,7 +61,7 @@ runs:
if [ -d "${DOCS_REPO_DIR}/docs/templates" ]
then
export SKRIPT_DOCS_TEMPLATE_DIR=${DOCS_REPO_DIR}/docs/templates
else
else # compatibility for older versions
export SKRIPT_DOCS_TEMPLATE_DIR=${DOCS_REPO_DIR}/doc-templates
fi
Expand All @@ -64,12 +70,16 @@ runs:
cd $SKRIPT_REPO_DIR
if [[ "${IS_RELEASE}" == "true" ]]; then
./gradlew genReleaseDocs releaseJavadoc
else
elif [[ "${GENERATE_JAVADOCS}" == "true" ]]; then
./gradlew genNightlyDocs javadoc
else
./gradlew genNightlyDocs
fi
if [ -d "${DOCS_OUTPUT_DIR}" ]; then
mkdir -p "${SKRIPT_DOCS_OUTPUT_DIR}/javadocs" && cp -a "./build/docs/javadoc/." "$_"
if [[ "${GENERATE_JAVADOCS}" == "true" ]]; then
mkdir -p "${SKRIPT_DOCS_OUTPUT_DIR}/javadocs" && cp -a "./build/docs/javadoc/." "$_"
fi
mkdir -p "/tmp/normalized-output-docs" && cp -a "${DOCS_OUTPUT_DIR}/." "$_"
mkdir -p "/tmp/normalized-generated-docs" && cp -a "${SKRIPT_DOCS_OUTPUT_DIR}/." "$_"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/nightly-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ name: Nightly documentation
on:
push:
branches:
- '**'
- 'dev/feature'
- 'dev/patch'
- 'enhancement/**'
- 'feature/**'
- 'fix/**'
tags-ignore:
- '**'

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/SkriptCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ else if (args[0].equalsIgnoreCase("info")) {
else if (args[0].equalsIgnoreCase("gen-docs")) {
File templateDir = Documentation.getDocsTemplateDirectory();
if (!templateDir.exists()) {
Skript.error(sender, "Cannot generate docs! Documentation templates not found at 'plugins/Skript/doc-templates/'");
Skript.error(sender, "Cannot generate docs! Documentation templates not found at '" + Documentation.getDocsTemplateDirectory().getPath() + "'");
TestMode.docsFailed = true;
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/ch/njol/skript/SkriptCommandTabCompleter.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package ch.njol.skript;

import ch.njol.skript.doc.Documentation;
import ch.njol.skript.test.runner.TestMode;
import ch.njol.util.StringUtils;
import org.bukkit.command.Command;
Expand Down Expand Up @@ -116,7 +117,7 @@ public List<String> onTabComplete(CommandSender sender, Command command, String
options.add("disable");
options.add("update");
options.add("info");
if (new File(Skript.getInstance().getDataFolder() + "/doc-templates").exists())
if (Documentation.getDocsTemplateDirectory().exists())
options.add("gen-docs");
if (TestMode.DEV_MODE)
options.add("test");
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/lang/english.lang
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ skript command:
changes: Lists all changes since the current version
download: Download the newest version
info: Prints a message with links to Skript's aliases and documentation
gen-docs: Generates documentation using doc-templates in plugin folder
gen-docs: Generates documentation using docs/templates in plugin folder
test: Used for running internal Skript tests

invalid script: Can't find the script <grey>'<gold>%s<grey>'<red> in the scripts folder!
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/lang/french.lang
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ skript command:
changes: Liste toutes les modifications apportées depuis la version actuelle
download: Télécharge la dernière version
info: Affiche un message contenant les liens vers les alias et la documentation de Skript
gen-docs: Génère la documentation en utilisant doc-templates dans le dossier du plugin
gen-docs: Génère la documentation en utilisant docs/templates dans le dossier du plugin
test: Utilisé pour exécuter les tests Skript

invalid script: Impossible de trouver le script <grey>'<gold>%s<grey>'<red> dans le dossier des scripts !
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/lang/german.lang
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ skript command:
changes: Listet alle Änderungen seit der aktuellen Version auf (auf englisch)
download: Lädt die neueste Version herunter
info: Druckt eine Nachricht mit Links zu den Aliases und der Dokumentation von Skript.
gen-docs: Generiert Dokumentation mithilfe von doc-templates im Plugin-Ordner
gen-docs: Generiert Dokumentation mithilfe von docs/templates im Plugin-Ordner
test: Wird zum Ausführen von Skript-Tests verwendet

invalid script: Das Skript <grey>'<gold>%s<grey>'<red> konnte nicht gefunden werden.
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/lang/simplifiedchinese.lang
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ skript command:
changes: 列出自当前版本以来的所有变化
download: 下载最新的版本
info: 打印一个带有Skript的别名和文档链接的信息
gen-docs: 使用插件文件夹中的doc-templates生成文档
gen-docs: 使用插件文件夹中的docs/templates生成文档
test: 用于运行内部的Skript测试

invalid script: 无法在scripts文件夹中找到脚本<grey>“<gold>%s<grey>”<red>!
Expand Down

0 comments on commit f348832

Please sign in to comment.