Skip to content

Commit

Permalink
leftovers cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudokhvist committed Sep 15, 2024
1 parent d06c215 commit c3e5ae8
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions ItemDispenser/ItemDispenser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,39 +86,6 @@ internal sealed class ItemDispenser : IBotTradeOffer2, IBotModules, IGitHubPlugi
return asset.DownloadURL;
}

//public Task<ReleaseAsset?> GetTargetReleaseAsset(Version asfVersion, string asfVariant, Version newPluginVersion, IReadOnlyCollection<ReleaseAsset> releaseAssets) {
// ArgumentNullException.ThrowIfNull(asfVersion);
// ArgumentException.ThrowIfNullOrEmpty(asfVariant);
// ArgumentNullException.ThrowIfNull(newPluginVersion);

// if ((releaseAssets == null) || (releaseAssets.Count == 0)) {
// throw new ArgumentNullException(nameof(releaseAssets));
// }

// Collection<ReleaseAsset?> matches = [.. releaseAssets.Where(r => r.Name.Equals(Name + ".zip", StringComparison.OrdinalIgnoreCase))];

// if (matches.Count != 1) {
// return Task.FromResult((ReleaseAsset?) null);
// }

// ReleaseAsset? release = matches[0];
// Version? currentASFVersion = Assembly.GetEntryAssembly()?.GetName().Version;

// ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, "Versions: {0}, {1}, {2}, {3}", JsonSerializer.Serialize(Version), JsonSerializer.Serialize(newPluginVersion), JsonSerializer.Serialize(asfVersion), JsonSerializer.Serialize(currentASFVersion)));

// if (currentASFVersion == null) {
// ASF.ArchiLogger.LogGenericWarning("Unable to check ASF version");
// return Task.FromResult((ReleaseAsset?) null);
// }

// if ((Version.Major == newPluginVersion.Major && Version.Minor == newPluginVersion.Minor && Version.Build == newPluginVersion.Build) || asfVersion != currentASFVersion) {
// return Task.FromResult(release);
// } else {
// ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, "New plugin version {0} is only compatible with latest ASF version", newPluginVersion));
// return Task.FromResult((ReleaseAsset?) null);
// }
//}

public Task OnBotInitModules(Bot bot, IReadOnlyDictionary<string, JsonElement>? additionalConfigProperties) {
ArgumentNullException.ThrowIfNull(bot);

Expand Down

0 comments on commit c3e5ae8

Please sign in to comment.