-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include SourcesDirectory in prebuild path usage
- Loading branch information
1 parent
b633318
commit 7e7cd31
Showing
1 changed file
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |