Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Commit 9eb78c6

Browse files
committed
update appx logic for new packages on github
1 parent 261dfb6 commit 9eb78c6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/Rune.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<RootNamespace>Rune.CLI</RootNamespace>
88
<ApplicationIcon>resource\icon.ico</ApplicationIcon>
99
<StartupObject></StartupObject>
10-
<Version>0.70.617-beta</Version>
10+
<Version>0.70.618-beta</Version>
1111
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
1212
<PlatformTarget>x64</PlatformTarget>
1313
</PropertyGroup>

src/etc/Appx.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public async ValueTask<FileInfo> DownloadAsync()
2929
.WithHeader("User-Agent", $"RuneCLI/{HelpCommand.GetVersion()}")
3030
.GetJsonAsync<GithubRelease[]>();
3131
var release = releases.First();
32-
var targetFile = Config.Get($"github_{_type}", "file", $"{_type}-{OS}.zip");
32+
var targetFile = Config.Get($"github_{_type}", "file", $"{_type}-{OS}-{Arch}.zip");
3333

3434
var asset = release.Assets.FirstOrDefault(x => x.Name == targetFile);
3535

@@ -56,7 +56,8 @@ public async ValueTask<FileInfo> DownloadAsync()
5656
return new FileInfo(Path.Combine(Dirs.CacheFolder.FullName, targetFile));
5757
}
5858

59-
59+
private string Arch
60+
=> RuntimeInformation.ProcessArchitecture.ToString().ToLowerInvariant();
6061
private string OS
6162
{
6263
get
@@ -65,11 +66,11 @@ private string OS
6566
throw new NotSupportedException($"{RuntimeInformation.ProcessArchitecture} is not support.");
6667

6768
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
68-
return "win64";
69+
return "win10";
6970
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
70-
return "linux64";
71+
return "linux";
7172
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
72-
return "osx64";
73+
return $"osx.10.14";
7374
throw new NotSupportedException($"{RuntimeInformation.OSDescription} is not support.");
7475
}
7576
}

0 commit comments

Comments
 (0)