fix update

This commit is contained in:
Jakob 2021-09-17 12:41:08 +02:00
parent 02d0074e5c
commit e77c1e4145
2 changed files with 11 additions and 8 deletions

View file

@ -390,7 +390,9 @@ namespace EnvyUpdate
public static async Task DoUpdateAsync() public static async Task DoUpdateAsync()
{ {
using (var manager = new UpdateManager(new GithubPackageResolver("fyr77", "EnvyUpdate", "EnvyUpdate*.zip"), new ZipPackageExtractor())) using (var httpc = new System.Net.Http.HttpClient())
{
using (var manager = new UpdateManager(new WebPackageResolver(httpc, "https://dev.jakobsenkl.pw/envyupdate/versions.txt"), new ZipPackageExtractor()))
{ {
// Check for new version and, if available, perform full update and restart // Check for new version and, if available, perform full update and restart
await manager.CheckPerformUpdateAsync(); await manager.CheckPerformUpdateAsync();
@ -398,3 +400,4 @@ namespace EnvyUpdate
} }
} }
} }
}

View file

@ -1,11 +1,11 @@
{ {
"version": "2.9", "version": "2.10",
"description": "A small update checker for NVidia GPUs.", "description": "A small update checker for NVidia GPUs.",
"homepage": "https://github.com/fyr77/EnvyUpdate", "homepage": "https://github.com/fyr77/EnvyUpdate",
"license": "MIT", "license": "MIT",
"url": "https://github.com/fyr77/EnvyUpdate/releases/download/2.9/PackageManagerZip.zip", "url": "https://dev.jakobsenkl.pw/envyupdate/2.10-scoop",
"hash": "1041E050C0C1C7DC91E5CF18E0DBB445315BE93D53FEFD85ED0165CE5A85A9C1", "hash": "4CFCBDBBBA8ED4EFC1D226C8BAB4F78DD4F7A0C11A543ADA951DE66B0751F8ED",
"extract_dir": "EnvyUpdate-2.9", "extract_dir": "EnvyUpdate-2.10",
"bin": "EnvyUpdate.exe", "bin": "EnvyUpdate.exe",
"shortcuts": [ "shortcuts": [
[ [
@ -18,6 +18,6 @@
"github": "https://github.com/fyr77/EnvyUpdate" "github": "https://github.com/fyr77/EnvyUpdate"
}, },
"autoupdate": { "autoupdate": {
"url": "https://github.com/fyr77/EnvyUpdate/releases/download/$version/PackageManagerZip.zip" "url": "https://dev.jakobsenkl.pw/envyupdate/$version-scoop"
} }
} }