public async void DoUpdateCheck(CactbotEventSourceConfig config) { var pluginDirectory = GetCactbotDirectory(); if (pluginDirectory == "") { logger_.LogError(Strings.UnableUpdateDueToUnknownDirectoryErrorMessage); return; } if (Directory.Exists(Path.Combine(pluginDirectory, ".git"))) { logger_.LogInfo(Strings.IgnoreUpdateDueToDotGitDirectoryMessage); return; } var options = new UpdaterOptions { project = "cactbot", pluginDirectory = pluginDirectory, lastCheck = config.LastUpdateCheck, currentVersion = GetCactbotVersion(), checkInterval = TimeSpan.FromMinutes(5), repo = kRepo, downloadUrl = kDownloadUrl, strippedDirs = 2, actPluginId = 78, }; await Updater.RunAutoUpdater(options); config.LastUpdateCheck = options.lastCheck; }
public async void DoUpdateCheck(CactbotEventSourceConfig config) { var pluginDirectory = GetCactbotDirectory(); if (pluginDirectory == "") { logger_.LogError("Unable to auto-update due to unknown cactbot directory"); return; } if (Directory.Exists(Path.Combine(pluginDirectory, ".git"))) { logger_.LogInfo("Ignoring auto-update due to cactbot directory being a .git repo."); return; } var options = new UpdaterOptions { project = "cactbot", pluginDirectory = pluginDirectory, lastCheck = config.LastUpdateCheck, currentVersion = GetCactbotVersion(), checkInterval = TimeSpan.FromMinutes(15), repo = kRepo, downloadUrl = kDownloadUrl, strippedDirs = 2, }; await Updater.RunAutoUpdater(options); config.LastUpdateCheck = options.lastCheck; }