Skip to content

Commit

Permalink
Merge stable-develop into beta-develop
Browse files Browse the repository at this point in the history
  • Loading branch information
welles committed Sep 22, 2023
2 parents 3b4bec5 + b715eba commit 65b98bf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Version>3.0.3.0</Version>
<GameVersion>1.2.3.24202-beta</GameVersion>
<GameBranch>Beta</GameBranch>
<DepotName>v1.2.0</DepotName>
<HarmonyVersion>2.2.2</HarmonyVersion>
<MCMVersion>5.9.1</MCMVersion>
<ButterLibVersion>2.8.13</ButterLibVersion>
Expand Down
17 changes: 10 additions & 7 deletions Download-Game.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ Param(
$Branch = "stable"
)

$CurrentBeta = "1.2.0"
$DepotVersion = Get-Content $PWD\Directory.Build.props | Select-String -Pattern "<DepotName>([\w.-]+)<\/DepotName>" | ForEach-Object { $($_.Matches.Groups[1]).Value }

$GameDirectory = If ($Branch -eq "stable") { "bannerlord-stable" } ElseIf ($Branch -eq "beta") { "bannerlord-beta" } Else { throw "Invalid branch name!" }

$SteamCmdUrl = "https://steamcdn-a.akamaihd.net/client/installer/steamcmd.zip";

Write-Host "Downloading / updating game for branch [$Branch]" -ForegroundColor Cyan
Write-Host "Downloading game for branch [$Branch ($DepotVersion)] into [$GameDirectory]" -ForegroundColor Cyan

Write-Host "Checking if SteamCMD is installed... " -NoNewline

If (!(Test-Path "$PWD\bin"))
{
New-Item -Path "$PWD\bin" -Type Directory | Out-Null
}

If (Test-Path "$PWD\bin\steamcmd\steamcmd.exe")
{
Write-Host "[OK]" -ForegroundColor Green
Expand Down Expand Up @@ -49,8 +56,4 @@ Else
Return
}

$GameDirectory = If ($Branch -eq "stable") { "bannerlord-stable" } ElseIf ($Branch -eq "beta") { "bannerlord-beta" } Else { throw "Invalid branch name!" }

$GameBranch = If ($Branch -eq "stable") { "public" } ElseIf ($Branch -eq "beta") { $CurrentBeta } Else { throw "Invalid branch name!" }

&"$PWD\bin\steamcmd\steamcmd.exe" +force_install_dir "$PWD\bin\$GameDirectory" +login $Credentials[0] $Credentials[1] "+app_update 261550 -beta $GameBranch validate" +quit
&"$PWD\bin\steamcmd\steamcmd.exe" +force_install_dir "$PWD\bin\$GameDirectory" +login $Credentials[0] $Credentials[1] "+app_update 261550 -beta $DepotVersion validate" +quit

0 comments on commit 65b98bf

Please sign in to comment.