package: Add warning field to plugin manifest (#159)

This commit is contained in:
Abex
2020-05-14 21:28:38 -06:00
committed by GitHub
parent 7011ab279d
commit d8dd80fa59
3 changed files with 7 additions and 2 deletions

View File

@@ -42,7 +42,7 @@ for PLUGINFILE in plugins/*; do
disabled=
# shellcheck disable=SC2162
while read LINE || [[ -n "$LINE" ]]; do
[[ $LINE =~ ^(repository|commit|disabled)=(.*)$ ]]
[[ $LINE =~ ^(repository|commit|disabled|warning)=(.*)$ ]]
eval "${BASH_REMATCH[1]}=\"${BASH_REMATCH[2]}\""
done < "$PLUGINFILE"
[ -z "$disabled" ] || continue

View File

@@ -42,7 +42,7 @@ RUNELITE_VERSION="$(cat "$SCRIPT_HOME/runelite.version")"
disabled=
# shellcheck disable=SC2162
while read LINE || [[ -n "$LINE" ]]; do
[[ $LINE =~ ^(repository|commit|disabled)=(.*)$ ]]
[[ $LINE =~ ^(repository|commit|disabled|warning)=(.*)$ ]]
eval "${BASH_REMATCH[1]}=\"${BASH_REMATCH[2]}\""
done < "$PLUGINFILE"
[ -z "$disabled" ] || exit 0
@@ -81,6 +81,7 @@ SIGNING_KEY="" REPO_CREDS="" gradle \
-DrlpluginOutputDirectory="$BUILDDIR" \
-DrlpluginPluginID="$PLUGIN_ID" \
-DrlpluginCommit="$commit" \
-DrlpluginWarning="$warning" \
rlpluginPackageJar rlpluginEmitManifest
[ -s "$BUILDDIR/plugin.jar" ]

View File

@@ -68,6 +68,9 @@ allprojects {
def manifest = new ExternalPluginManifest()
manifest.internalName = System.properties["rlpluginPluginID"]
manifest.commit = System.properties["rlpluginCommit"]
if (System.properties["rlpluginWarning"]) {
manifest.warning = System.properties["rlpluginWarning"];
}
def pluginJar = new File(System.properties["rlpluginOutputDirectory"], "plugin.jar");
manifest.hash = Files.asByteSource(pluginJar)
@@ -147,6 +150,7 @@ class ExternalPluginManifest {
String version;
String author;
String description;
String warning;
String[] tags;
URL support;
boolean hasIcon;