delta-client icon indicating copy to clipboard operation
delta-client copied to clipboard

Check update availability

Open stackotter opened this issue 4 years ago • 3 comments

The in-app updater currently always allows users to update even if they are already up-to-date and even if updating would in fact 'downdate'. Perhaps GitHub actions builds can insert a file into the .app containing the commit hash so that the app can know which commit it was built from?

stackotter avatar Oct 07 '21 22:10 stackotter

The commit is stored in the app's Info.plist as part of the short version string (can be accessed using Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String)

stackotter avatar Oct 10 '22 00:10 stackotter

You can use the GitHub API to get the commit date from each commit and then use that to determine if updating would 'downdate'. Downdating should just be a warning cause there are legitimate reasons to do so. Updating to the same commit should probably just be not allowed, but if you can think of reason why someone would do that then feel free to make it also just a warning.

stackotter avatar Oct 10 '22 00:10 stackotter

I'll also give this one a try (also when I get Xcode working).

nekename avatar Oct 10 '22 20:10 nekename