mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 15:14:41 +00:00
Fix AutoUpdate for self-builds, #586
This commit is contained in:
parent
6d22b19ef3
commit
db149d16a7
5 changed files with 12 additions and 4 deletions
|
@ -37,6 +37,7 @@ using ArchiSteamFarm.Localization;
|
|||
namespace ArchiSteamFarm {
|
||||
internal static class ASF {
|
||||
private const byte AutoUpdatePeriodInHours = 24;
|
||||
private const string DefaultVersion = "source"; // Default entry of ArchiSteamFarm.version
|
||||
|
||||
internal static readonly ArchiLogger ArchiLogger = new ArchiLogger(SharedInfo.ASF);
|
||||
|
||||
|
@ -81,6 +82,10 @@ namespace ArchiSteamFarm {
|
|||
return;
|
||||
}
|
||||
|
||||
if (version.Equals(DefaultVersion)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((AutoUpdatesTimer == null) && Program.GlobalConfig.AutoUpdates) {
|
||||
TimeSpan autoUpdatePeriod = TimeSpan.FromHours(AutoUpdatePeriodInHours);
|
||||
|
||||
|
@ -290,6 +295,7 @@ namespace ArchiSteamFarm {
|
|||
}
|
||||
|
||||
switch (version) {
|
||||
case DefaultVersion:
|
||||
case "generic":
|
||||
case "linux-arm":
|
||||
case "linux-x64":
|
||||
|
|
|
@ -44,6 +44,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="ArchiSteamFarm.version">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="config\ASF.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
|
1
ArchiSteamFarm/ArchiSteamFarm.version
Normal file
1
ArchiSteamFarm/ArchiSteamFarm.version
Normal file
|
@ -0,0 +1 @@
|
|||
source
|
|
@ -184,9 +184,7 @@ namespace ArchiSteamFarm {
|
|||
ParsePostInitArgs(args);
|
||||
}
|
||||
|
||||
if (!Debugging.IsDebugBuild) {
|
||||
await ASF.CheckForUpdate().ConfigureAwait(false);
|
||||
}
|
||||
await ASF.CheckForUpdate().ConfigureAwait(false);
|
||||
|
||||
await ASF.InitBots().ConfigureAwait(false);
|
||||
ASF.InitEvents();
|
||||
|
|
|
@ -33,7 +33,7 @@ after_test:
|
|||
dotnet publish -c "$env:CONFIGURATION" -r "$RUNTIME" -o "out\$RUNTIME"
|
||||
}
|
||||
|
||||
Add-Content "ArchiSteamFarm\out\$RUNTIME\ArchiSteamFarm.version" "$RUNTIME"
|
||||
Set-Content -Path "ArchiSteamFarm\out\$RUNTIME\ArchiSteamFarm.version" -Value "$RUNTIME"
|
||||
|
||||
7z a -bd -tzip -mm=Deflate64 -mx=5 "ArchiSteamFarm\out\ASF-$RUNTIME.zip" "$env:APPVEYOR_BUILD_FOLDER\ArchiSteamFarm\out\$RUNTIME\*"
|
||||
Push-AppveyorArtifact "ArchiSteamFarm\out\ASF-$RUNTIME.zip" -FileName "ASF-$RUNTIME.zip" -DeploymentName "ASF-$RUNTIME.zip"
|
||||
|
|
Loading…
Reference in a new issue