Skip to content

Commit 15efd12

Browse files
committed
Further improve build script, fix compile warnings, update deps
1 parent d9c8256 commit 15efd12

File tree

7 files changed

+41
-16
lines changed

7 files changed

+41
-16
lines changed

build.sh

+25-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1+
echo "Cleaning last build..."
2+
rm -rf build
3+
4+
echo "Building just the bot..."
5+
16
cd src/Bot
27

3-
dotnet publish -c release -r linux-arm64 --self-contained true -o ../../build/linux-arm64
8+
dotnet publish -c release -r linux-arm64 --self-contained true -o ../../build/linux-arm64/classic
9+
10+
dotnet publish -c release -r linux-x64 --self-contained true -o ../../build/linux-x64/classic
11+
12+
dotnet publish -c release -r win-x64 --self-contained true -o ../../build/win-x64/classic
13+
14+
dotnet publish -c release -r osx-arm64 --self-contained true -o ../../build/osx-arm64/classic
15+
16+
dotnet publish -c release -r osx-x64 --self-contained true -o ../../build/osx-x64/classic
17+
18+
cd ../../src/UI
19+
echo "Switching to the Avalonia project..."
20+
21+
dotnet publish -c release -r linux-arm64 --self-contained true -o ../../build/linux-arm64/ui
22+
23+
dotnet publish -c release -r linux-x64 --self-contained true -o ../../build/linux-x64/ui
24+
25+
dotnet publish -c release -r win-x64 --self-contained true -o ../../build/win-x64/ui
426

5-
dotnet publish -c release -r linux-x64 --self-contained true -o ../../build/linux-x64
27+
dotnet publish -c release -r osx-arm64 --self-contained true -o ../../build/osx-arm64/ui
628

7-
dotnet publish -c release -r win-x64 --self-contained true -o ../../build/win-x64
29+
dotnet publish -c release -r osx-x64 --self-contained true -o ../../build/osx-x64/ui

src/Bot/Commands/Modules/Utility/ColorCommand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public sealed partial class UtilityModule
44
{
55
[Command("Color", "Colour", "C")]
66
[Description("Shows the Hex and RGB representation for a given role in the current guild; or just a color.")]
7-
public async Task<ActionResult> RoleColorAsync(
7+
public Task<ActionResult> RoleColorAsync(
88
[Remainder,
99
Description("The color you want to see, in #hex or RGB, or a role whose color you want to be shown.")]
1010
string colorOrRole)

src/Bot/Interactions/API/Results/InteractionBadRequestResult.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ public class InteractionBadRequestResult : RuntimeResult
66
{
77
public InteractionBadRequestResult(string error) : base(null, error) {}
88

9-
public static implicit operator Task<InteractionBadRequestResult>(InteractionBadRequestResult input)
10-
=> Task.FromResult(input);
9+
public static implicit operator Task<RuntimeResult>(InteractionBadRequestResult input)
10+
=> Task.FromResult<RuntimeResult>(input);
1111
}

src/Bot/Interactions/API/Results/InteractionOkResult.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public InteractionOkResult(ReplyBuilder<TInteraction> reply) : base(null, string
1111

1212
public readonly ReplyBuilder<TInteraction> Reply;
1313

14-
public static implicit operator Task<InteractionOkResult<TInteraction>>(InteractionOkResult<TInteraction> input)
15-
=> Task.FromResult(input);
14+
public static implicit operator Task<RuntimeResult>(InteractionOkResult<TInteraction> input)
15+
=> Task.FromResult<RuntimeResult>(input);
1616
}
1717

src/Bot/Interactions/Commands/Modules/Utility/SpotifyCommand.cs

+7-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Volte.Interactions.Commands.Modules;
55
public partial class InteractionUtilityModule
66
{
77
[SlashCommand("spotify", "Shows what you're listening to on Spotify, if you're listening to something.")]
8-
public async Task<RuntimeResult> SpotifyAsync(
8+
public Task<RuntimeResult> SpotifyAsync(
99
[Summary(description: "The member whose Spotify you want to see. Defaults to yourself.")]
1010
SocketUser user)
1111
{
@@ -17,10 +17,13 @@ public async Task<RuntimeResult> SpotifyAsync(
1717
.WithDescription(sb =>
1818
sb.AppendLine($"**Track:** {Format.Url(spotify.TrackTitle, spotify.TrackUrl)}")
1919
.AppendLine($"**Album:** {spotify.AlbumTitle}")
20-
.AppendLine($"**Duration:** {(spotify.Duration.HasValue ? spotify.Duration.Value.Humanize(2) : "<not provided>")}")
20+
.AppendLine(
21+
$"**Duration:** {(spotify.Duration.HasValue ? spotify.Duration.Value.Humanize(2) : "<not provided>")}")
2122
.AppendLine($"**Artist(s):** {spotify.Artists.JoinToString(", ")}")
22-
.AppendLine($"**Started At:** {spotify.StartedAt?.ToDiscordTimestamp(TimestampType.LongTime) ?? "<not provided>"}")
23-
.AppendLine($"**Ends At:** {spotify.EndsAt?.ToDiscordTimestamp(TimestampType.LongTime) ?? "<not provided>"}"))
23+
.AppendLine(
24+
$"**Started At:** {spotify.StartedAt?.ToDiscordTimestamp(TimestampType.LongTime) ?? "<not provided>"}")
25+
.AppendLine(
26+
$"**Ends At:** {spotify.EndsAt?.ToDiscordTimestamp(TimestampType.LongTime) ?? "<not provided>"}"))
2427
.WithThumbnailUrl(spotify.AlbumArtUrl),
2528
ephemeral: true
2629
)

src/Bot/Volte.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@
3333
<ItemGroup>
3434
<PackageReference Include="Discord.Net.Interactions" Version="3.15.3" />
3535
<PackageReference Include="Discord.Net.WebSocket" Version="3.15.3" />
36-
<PackageReference Include="Gommon" Version="2.6.5" />
37-
<PackageReference Include="GreemDev.Colorful.Console" Version="1.3.0" />
36+
<PackageReference Include="Gommon" Version="2.7.0.1" />
37+
<PackageReference Include="GreemDev.Colorful.Console" Version="1.3.1" />
3838
<PackageReference Include="Humanizer.Core" Version="2.14.1" />
3939
<PackageReference Include="LiteDB" Version="5.0.21" />
4040
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="4.10.0" />
4141
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
4242
<PackageReference Include="Qmmands" Version="4.0.1-nightly-00257" />
4343
<PackageReference Include="Sentry" Version="4.9.0" />
44-
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.5" />
44+
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.6" />
4545
</ItemGroup>
4646
<ItemGroup>
4747
<Folder Include="Resources\" />

src/UI/Volte.UI.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<ImplicitUsings>enable</ImplicitUsings>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<PackageReference Include="FluentAvaloniaUI" Version="2.1.0" />
12+
<PackageReference Include="FluentAvaloniaUI" Version="2.2.0" />
1313
<PackageReference Include="Avalonia" Version="11.1.2" />
1414
<PackageReference Include="Avalonia.Desktop" Version="11.1.2" />
1515
<PackageReference Include="Avalonia.Diagnostics" Version="11.1.2" Condition="'$(Configuration)' == 'Debug'" />

0 commit comments

Comments
 (0)