Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/apps/api/ViGet/ViGetCommand.cs
diff options
context:
space:
mode:
authorLeitwolf112026-11-05 16:49:57 +0300
committerLeitwolf112026-11-05 16:49:57 +0300
commit4a00a68309a3605dafedbc522569fc1b2c8aca1e (patch)
treee643401461646dc1ef6f134c2348914f97756232 /apps/api/ViGet/ViGetCommand.cs
parent35e09214817585007308bdbc26d877791843ab29 (diff)
downloadprogmaweb-4a00a68309a3605dafedbc522569fc1b2c8aca1e.tar.gz
Take who a Tazel plugin is from the publish command
Tazel no longer puts a publisher, a name or a version into the descriptor of a plugin JAR (plugin API 3): who a plugin is comes from ViGet, which records it when the plugin is pushed, or from the path of a localPlugin. - viget publish-tazel-plugin takes <Publisher> <Name> <Version> <jar>. - TazelPluginDescriptor.TryRead and TazelPluginPublishing.PublishAsync take the three from the caller and check them as before: one identifier each for publisher and name, an exact version of three to five numbers. - A descriptor that holds publisher, name or version is refused, with the keys it names. - ops/README.md shows the new command line.
Diffstat (limited to 'apps/api/ViGet/ViGetCommand.cs')
-rw-r--r--apps/api/ViGet/ViGetCommand.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/api/ViGet/ViGetCommand.cs b/apps/api/ViGet/ViGetCommand.cs
index ad99aee..f91f46f 100644
--- a/apps/api/ViGet/ViGetCommand.cs
+++ b/apps/api/ViGet/ViGetCommand.cs
@@ -7,7 +7,8 @@ namespace Progmasoft.Progmaweb.Api.ViGet;
/// <summary>
/// The commands that manage the Tazel plugin catalog on the server, while publishing is not open through the API:
-/// <c>viget publish-tazel-plugin &lt;jar&gt;</c> and <c>viget yank-tazel-plugin &lt;Publisher&gt; &lt;Name&gt;
+/// <c>viget publish-tazel-plugin &lt;Publisher&gt; &lt;Name&gt; &lt;Version&gt; &lt;jar&gt;</c>, which names who the
+/// plugin is because its JAR does not, and <c>viget yank-tazel-plugin &lt;Publisher&gt; &lt;Name&gt;
/// &lt;Version&gt; [--undo]</c>. They run with the configuration of the service, as its user.
/// </summary>
internal static class ViGetCommand
@@ -37,7 +38,7 @@ internal static class ViGetCommand
switch (args)
{
- case ["publish-tazel-plugin", string path]:
+ case ["publish-tazel-plugin", string publisher, string name, string version, string path]:
{
if (!File.Exists(path))
{
@@ -47,7 +48,8 @@ internal static class ViGetCommand
TazelPluginPublishing publishing = services.GetRequiredService<TazelPluginPublishing>();
PublishResult result = await publishing.PublishAsync(
- await File.ReadAllBytesAsync(path, cancellationToken), cancellationToken);
+ await File.ReadAllBytesAsync(path, cancellationToken), publisher, name, version,
+ cancellationToken);
if (!result.Published)
{
await errors.WriteLineAsync(result.Error);
@@ -77,7 +79,7 @@ internal static class ViGetCommand
}
default:
await errors.WriteLineAsync(
- "usage: viget publish-tazel-plugin <jar>\n" +
+ "usage: viget publish-tazel-plugin <Publisher> <Name> <Version> <jar>\n" +
" viget yank-tazel-plugin <Publisher> <Name> <Version> [--undo]");
return 2;
}