2024-02-26 11:15:58 -05:00
|
|
|
## Orchestrate the build process for the SPT project
|
|
|
|
|
2024-02-14 01:35:01 -05:00
|
|
|
Write-Output " » Beginning SPT Build Process"
|
|
|
|
|
2024-02-26 11:15:58 -05:00
|
|
|
# Check for the required MODULE_DOMAIN environment variable
|
|
|
|
$MODULE_DOMAIN = $env:MODULE_DOMAIN
|
|
|
|
$MODULE_DOMAIN_REGEX = '^(https?:\/\/)?([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(\/)?$'
|
|
|
|
if ([string]::IsNullOrWhiteSpace($MODULE_DOMAIN) -or -not $MODULE_DOMAIN -match $MODULE_DOMAIN_REGEX -or $MODULE_DOMAIN.EndsWith("/")) {
|
|
|
|
Write-Output " » FAIL: The MODULE_DOMAIN environment variable is invalid."
|
2024-02-14 01:35:01 -05:00
|
|
|
exit 1 # Fail the build
|
|
|
|
}
|
|
|
|
|
2024-02-26 11:15:58 -05:00
|
|
|
# TODO: Make dynamic, based on the commit information
|
2024-02-14 01:35:01 -05:00
|
|
|
$RELEASE_TAG = "3.8.0-BE"
|
|
|
|
|
2024-02-26 11:15:58 -05:00
|
|
|
# Get the current directory
|
|
|
|
$DIR_ABS = (Get-Location).Path
|
2024-02-14 01:35:01 -05:00
|
|
|
|
2024-02-26 11:15:58 -05:00
|
|
|
# TODO: Validate that the tag exists in all three repositories before continuing the build.
|
|
|
|
pwsh $DIR_ABS\project\validate_tag.ps1 $RELEASE_TAG
|
2024-02-14 01:35:01 -05:00
|
|
|
|
|
|
|
# Build the projects
|
2024-02-26 11:15:58 -05:00
|
|
|
pwsh $DIR_ABS\project\build_server.ps1 $RELEASE_TAG
|
|
|
|
pwsh $DIR_ABS\project\build_modules.ps1 $RELEASE_TAG $MODULE_DOMAIN
|
|
|
|
pwsh $DIR_ABS\project\build_launcher.ps1 $RELEASE_TAG
|
|
|
|
|
|
|
|
# Combine the built files into the output directory
|
|
|
|
pwsh $DIR_ABS\project\combine_builds.ps1
|