Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling multiple updates #4

Open
b2k opened this issue May 26, 2015 · 1 comment
Open

Handling multiple updates #4

b2k opened this issue May 26, 2015 · 1 comment

Comments

@b2k
Copy link

b2k commented May 26, 2015

I added a bit of code to the update process to handle multiple pending updates.

In the server manifest I added
<manifests>
<manifest>
....
</manifest>
<manifest>
...
</manifest>
</manifests>

            // download manifest
            XDocument doc = XDocument.Load(Settings.Default.RemoteManifest);

            // b2k -- look for multiple versions in the file.
            var versions = doc.Descendants("version");
            if (versions.Count() > 1)
            {
                var nextVersion =
                    versions.SkipWhile(node => new Version(node.Value) <= appVersion ).FirstOrDefault();
                if (nextVersion != null && nextVersion.Parent != null)
                {
                    doc = new XDocument(nextVersion.Parent.ToString());
                }
            }
okoetter pushed a commit to okoetter/SimpleUpdater that referenced this issue Jan 18, 2016
@okoetter
Copy link

Hi b2k,
I used parts of your above code in my fork here:
https://github.com/okoetter/SimpleUpdater

This fork changes some parts of this project to better reflect my needs.

Best regards
Oliver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants