mirror of
https://github.com/runelite/plugin-hub.git
synced 2026-04-05 07:23:43 -04:00
package: Fail building manifest with placeholder values
This commit is contained in:
@@ -739,7 +739,7 @@ public class Plugin implements Closeable
|
||||
|
||||
{
|
||||
String displayName = (String) props.remove("displayName");
|
||||
if (Strings.isNullOrEmpty(displayName))
|
||||
if (Strings.isNullOrEmpty(displayName) || disallowedFatal && "Example".equals(displayName))
|
||||
{
|
||||
throw PluginBuildException.of(this, "\"displayName\" must be set")
|
||||
.withFile(propFile);
|
||||
@@ -749,7 +749,7 @@ public class Plugin implements Closeable
|
||||
|
||||
{
|
||||
String author = (String) props.remove("author");
|
||||
if (Strings.isNullOrEmpty(author))
|
||||
if (Strings.isNullOrEmpty(author) || disallowedFatal && "Nobody".equals(author))
|
||||
{
|
||||
throw PluginBuildException.of(this, "\"author\" must be set")
|
||||
.withFile(propFile);
|
||||
@@ -775,7 +775,15 @@ public class Plugin implements Closeable
|
||||
}
|
||||
}
|
||||
|
||||
manifest.setDescription((String) props.remove("description"));
|
||||
{
|
||||
String description = (String) props.remove("description");
|
||||
if (disallowedFatal && "An example greeter plugin".equals(description))
|
||||
{
|
||||
throw PluginBuildException.of(this, "\"description\" must be set")
|
||||
.withFile(propFile);
|
||||
}
|
||||
manifest.setDescription(description);
|
||||
}
|
||||
|
||||
{
|
||||
String tagsStr = (String) props.remove("tags");
|
||||
|
||||
@@ -96,7 +96,7 @@ public class PluginTest
|
||||
catch (PluginBuildException e)
|
||||
{
|
||||
log.info("ok: ", e);
|
||||
assertContains(e.getHelpText(), "com.example.ExamplePlugin");
|
||||
assertContains(e.getHelpText(), "com.example.TestExamplePlugin");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class PluginTest
|
||||
catch (PluginBuildException e)
|
||||
{
|
||||
log.info("ok: ", e);
|
||||
assertContains(e.getHelpText(), "com.example.ExamplePlugin");
|
||||
assertContains(e.getHelpText(), "com.example.TestExamplePlugin");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,10 +180,10 @@ public class PluginTest
|
||||
new File("./create_new_plugin.py").getAbsolutePath(),
|
||||
"--noninteractive",
|
||||
"--output_directory", p.repositoryDirectory.getAbsolutePath(),
|
||||
"--name", "Example",
|
||||
"--name", "Test Example",
|
||||
"--package", "com.example",
|
||||
"--author", "Nobody",
|
||||
"--description", "An example greeter plugin")
|
||||
"--author", "Test Nobody",
|
||||
"--description", "Test An example greeter plugin")
|
||||
.inheritIO()
|
||||
.start()
|
||||
.waitFor());
|
||||
|
||||
Reference in New Issue
Block a user