Skip to content

Commit

Permalink
add MinimumVersion manifest property
Browse files Browse the repository at this point in the history
  • Loading branch information
goaaats committed Jun 16, 2024
1 parent 3fc2308 commit 1832747
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion Plogon/BuildProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,14 @@ await this.dockerClient.Containers.RemoveContainerAsync(containerCreateResponse.
{
try
{
this.pluginRepository.UpdatePluginHave(task.Channel, task.InternalName, task.Manifest.Plugin.Commit, version!, changelog);
this.pluginRepository.UpdatePluginHave(
task.Channel,
task.InternalName,
task.Manifest.Plugin.Commit,
version!,
task.Manifest.Plugin.MinimumVersion,
changelog);

var repoOutputDir = this.pluginRepository.GetPluginOutputDirectory(task.Channel, task.InternalName);

foreach (var file in dpOutput.GetFiles())
Expand Down
2 changes: 2 additions & 0 deletions Plogon/Manifests/Manifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ public PluginInfo()

public string Version { get; set; }

public string MinimumVersion { get; set; }

public List<string> Owners { get; set; }

public Dictionary<string, string> Secrets { get; set; }
Expand Down
6 changes: 4 additions & 2 deletions Plogon/Repo/PluginRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void RemovePlugin(string channelName, string plugin)
/// <param name="haveCommit">Commit that is now have</param>
/// <param name="effectiveVersion">New version of the plugin</param>
/// <param name="changelog">Plugin changelog</param>
public void UpdatePluginHave(string channelName, string plugin, string haveCommit, string effectiveVersion, string? changelog)
public void UpdatePluginHave(string channelName, string plugin, string haveCommit, string effectiveVersion, string? minimumVersion, string? changelog)

Check warning on line 113 in Plogon/Repo/PluginRepository.cs

View workflow job for this annotation

GitHub Actions / build

Parameter 'minimumVersion' has no matching param tag in the XML comment for 'PluginRepository.UpdatePluginHave(string, string, string, string, string?, string?)' (but other parameters do)

Check warning on line 113 in Plogon/Repo/PluginRepository.cs

View workflow job for this annotation

GitHub Actions / build

Parameter 'minimumVersion' has no matching param tag in the XML comment for 'PluginRepository.UpdatePluginHave(string, string, string, string, string?, string?)' (but other parameters do)
{
if (!this.State.Channels.ContainsKey(channelName))
{
Expand All @@ -124,14 +124,16 @@ public void UpdatePluginHave(string channelName, string plugin, string haveCommi
pluginState.BuiltCommit = haveCommit;
pluginState.TimeBuilt = DateTime.Now;
pluginState.EffectiveVersion = effectiveVersion;
pluginState.MinimumVersion = minimumVersion;
}
else
{
pluginState = new State.Channel.PluginState()
pluginState = new State.Channel.PluginState
{
BuiltCommit = haveCommit,
TimeBuilt = DateTime.Now,
EffectiveVersion = effectiveVersion,
MinimumVersion = minimumVersion,
};
channel.Plugins[plugin] = pluginState;
}
Expand Down
2 changes: 2 additions & 0 deletions Plogon/Repo/State.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public PluginState()
public string BuiltCommit { get; set; }
public DateTime TimeBuilt { get; set; }
public string EffectiveVersion { get; set; }
public string? MinimumVersion { get; set; }

public Dictionary<string, PluginChangelog> Changelogs { get; set; }

public class PluginChangelog
Expand Down

0 comments on commit 1832747

Please sign in to comment.