mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix build?
This commit is contained in:
parent
57ae3b5e49
commit
c755124900
4 changed files with 10 additions and 2 deletions
|
|
@ -67,6 +67,7 @@ public class Misc
|
||||||
{
|
{
|
||||||
var content = $"Stats unavailable (is scheduled_tasks service running?)\n\n**Quick info:**"
|
var content = $"Stats unavailable (is scheduled_tasks service running?)\n\n**Quick info:**"
|
||||||
+ $"\nPluralKit [{BuildInfoService.Version}](<https://github.com/pluralkit/pluralkit/commit/{BuildInfoService.FullVersion}>)"
|
+ $"\nPluralKit [{BuildInfoService.Version}](<https://github.com/pluralkit/pluralkit/commit/{BuildInfoService.FullVersion}>)"
|
||||||
|
+ (BuildInfoService.IsDev ? ", **development build**" : "")
|
||||||
+ $"\nCurrently on shard {ctx.ShardId}, {shardsUp}/{shards.Count()} shards up,"
|
+ $"\nCurrently on shard {ctx.ShardId}, {shardsUp}/{shards.Count()} shards up,"
|
||||||
+ $" API latency: {apiLatency.TotalMilliseconds:F0}ms";
|
+ $" API latency: {apiLatency.TotalMilliseconds:F0}ms";
|
||||||
await ctx.Rest.EditMessage(msg.ChannelId, msg.Id,
|
await ctx.Rest.EditMessage(msg.ChannelId, msg.Id,
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<Target Name="SetSourceRevisionId" BeforeTargets="InitializeSourceControlInformation">
|
<Target Name="SetSourceRevisionId" BeforeTargets="InitializeSourceControlInformation">
|
||||||
<Exec Command="git rev-parse HEAD > ../.version & git show --no-patch --format=%at $(git rev-parse HEAD) >> ../.version & (git diff-index --quiet HEAD -- && echo 1) >> ../.version" IgnoreExitCode="True">
|
<Exec Command="../ci/dotnet-version.sh" IgnoreExitCode="False">
|
||||||
</Exec>
|
</Exec>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ public static class BuildInfoService
|
||||||
FullVersion = data[0];
|
FullVersion = data[0];
|
||||||
Timestamp = data[1];
|
Timestamp = data[1];
|
||||||
|
|
||||||
IsDev = data[2] == "";
|
IsDev = data.Length < 3 || data[2] == "";
|
||||||
|
|
||||||
// show only short commit hash to users
|
// show only short commit hash to users
|
||||||
Version = FullVersion.Remove(7);
|
Version = FullVersion.Remove(7);
|
||||||
|
|
|
||||||
7
ci/dotnet-version.sh
Executable file
7
ci/dotnet-version.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm ../.version || true
|
||||||
|
touch ../.version
|
||||||
|
git rev-parse HEAD >> ../.version
|
||||||
|
git show --no-patch --format=%at $(git rev-parse HEAD) >> ../.version
|
||||||
|
(git diff-index --quiet HEAD -- && echo 1) >> ../.version || true
|
||||||
Loading…
Add table
Add a link
Reference in a new issue