Beispiel #1
0
        public async Task Update()
        {
            await Evergreen.Update(Release);

            var notification = new Notification {
                Message  = "Restart to update.",
                ImageUrl = "",
                Title    = "Evergreen: Upate Complete"
            };

            FrameworkApplication.AddNotification(notification);
        }
Beispiel #2
0
 /// <summary>
 /// Called when the addin initializes to check for updates and download the latest
 /// </summary>
 /// <returns>Task</returns>
 public static Task RunAsyncUpdateCheck()
 {
     return(QueuedTask.Run(async() => {
         // check current release and update it if there's a newer version
         var evergreen = new Evergreen("roemhildtg", "arcgis-pro-addins");
         VersionInformation currentVersion = evergreen.GetCurrentAddInVersion();
         Release latestVersion = await evergreen.GetLatestReleaseFromGithub();
         if (!evergreen.IsCurrent(currentVersion.AddInVersion, latestVersion))
         {
             await evergreen.Update(latestVersion);
             var notify = new ArcGIS.Desktop.Framework.Notification();
             notify.Title = "Addin Update";
             notify.Message = string.Format("Your pro-addins have been updated to version {0}. Please restart Pro to complete the update.", latestVersion.TagName);
             FrameworkApplication.AddNotification(notify);
         }
     }));
 }
Beispiel #3
0
        private static void Main()
        {
            var updator = new Evergreen("steveoh", "pro-evergreen");
            var release = updator.GetLatestReleaseFromGithub().Result;

            var version = updator.GetCurrentAddInVersion();

            if (updator.IsCurrent(version.AddInVersion, release))
            {
                return;
            }

            var assets = updator.Update(release).Result;

//            if (!updator.IsCompatible("currentProVersion", ".proversion from assets in release")) {
//                throw new Exception("incompatible versions of pro");
//            }
//
//            updator.Update(assets);
        }