mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
update build script
This commit is contained in:
+23
-6
@@ -1,10 +1,27 @@
|
|||||||
|
function Get-ScriptRepoRoot {
|
||||||
|
$currentPath = $PSScriptRoot
|
||||||
|
while ($currentPath -ne $null -and $currentPath -ne "")
|
||||||
|
{
|
||||||
|
if (Test-Path (Join-Path $currentPath ".git")) {
|
||||||
|
return $currentPath
|
||||||
|
}
|
||||||
|
# Also check for .git file which indicates a submodule
|
||||||
|
$gitFile = Join-Path $currentPath ".git"
|
||||||
|
if (Test-Path $gitFile -PathType Leaf)
|
||||||
|
{
|
||||||
|
$gitContent = Get-Content $gitFile
|
||||||
|
if ($gitContent -match "gitdir: (.+)") {
|
||||||
|
return $currentPath
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$currentPath = Split-Path $currentPath -Parent
|
||||||
|
}
|
||||||
|
throw "Unable to find repository root"
|
||||||
|
}
|
||||||
|
|
||||||
$path_root = git rev-parse --show-toplevel
|
$path_repo_root = Get-ScriptRepoRoot
|
||||||
|
|
||||||
& "$PSScriptRoot/build_and_run_gen_src_pass"
|
& "$PSScriptRoot/build_and_run_gen_src_pass"
|
||||||
|
|
||||||
Push-Location $path_root
|
$compiler_build_script = join-path $path_repo_root 'build.bat'
|
||||||
|
& $compiler_build_script release
|
||||||
& build.bat release
|
|
||||||
|
|
||||||
Pop-Location
|
|
||||||
|
|||||||
Reference in New Issue
Block a user