Skip to content

Commit

Permalink
Include SourcesDirectory in prebuild path usage
Browse files Browse the repository at this point in the history
  • Loading branch information
coloursofnoise authored Sep 29, 2021
1 parent b633318 commit 7e7cd31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions azure-pipelines-prebuild.ps1
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Make the Everest version match the build number.
$BuildNumber = [string]([int]$env:Build_BuildId + [int]$env:Build_BuildIdOffset)
$EverestPath = [io.path]::combine('Celeste.Mod.mm', 'Mod', 'Everest', 'Everest.cs')
$EverestPath = [io.path]::combine($env:Build_SourcesDirectory, 'Celeste.Mod.mm', 'Mod', 'Everest', 'Everest.cs')
(Get-Content $EverestPath) -replace '(?<=public readonly static string VersionString = ")[^"]*', "1.$BuildNumber.0-azure-$(($env:BUILD_SOURCEVERSION).Substring(0, 5))" | Set-Content $EverestPath

# Currently unstable/in development
$HelperPath = [io.path]::combine('Celeste.Mod.mm', 'Mod', 'Helpers', 'EverestVersion.cs')
$HelperPath = [io.path]::combine($env:Build_SourcesDirectory, 'Celeste.Mod.mm', 'Mod', 'Helpers', 'EverestVersion.cs')
echo @"
namespace Celeste.Mod.Helpers {
internal static class EverestBuild$BuildNumber {
public static string EverestBuild = "EverestBuild$BuildNumber";
}
}
"@ | Set-Content $HelperPath
"@ | Set-Content $HelperPath

0 comments on commit 7e7cd31

Please sign in to comment.