Modify convenience scripts to search for exe (#92)
Removes hardcoded output paths and selects the most recently compiled exe automatically
This commit is contained in:
Родитель
e8d5e25ed4
Коммит
33c94f7a54
|
@ -2,7 +2,17 @@
|
|||
# Convenience Launcher for sesclient
|
||||
#
|
||||
|
||||
$sesclient = "$PSScriptRoot\x64\Debug\sesclient.native.exe"
|
||||
# Find the latest version of sesclient.native.exe that was compiled
|
||||
# [This will automatically find the right version, even if someone does a release
|
||||
# build or if the output path changes]
|
||||
$sesclient = get-childitem $PSScriptRoot\x64\sesclient.native.exe -recurse | sort-object LastWriteTimeUtc | select-object -last 1
|
||||
|
||||
if ($sesclient -eq $null)
|
||||
{
|
||||
Write-Host "Could not find 'sesclient.native.exe' within $PSScriptRoot\x64" -ForegroundColor Red
|
||||
Write-Host "Do you need to run a build?" -ForegroundColor Yellow
|
||||
exit -1
|
||||
}
|
||||
|
||||
# Uncomment this line to show which command is being run
|
||||
# Write-Output "Launching $sesclient $args"
|
||||
|
|
15
sestest.ps1
15
sestest.ps1
|
@ -2,9 +2,20 @@
|
|||
# Convenience Launcher for sestest
|
||||
#
|
||||
|
||||
$sestest = "$PSScriptRoot\out\sestest\netcoreapp2.0\sestest.dll"
|
||||
# Find the latest version of sestest that was compiled
|
||||
# [This will automatically find the right version, even if someone does a release
|
||||
# build or if the output path changes e.g. becuase it's no longer netcoreapp2.0]
|
||||
$sestest = get-childitem $PSScriptRoot\out\sestest.dll -recurse | sort-object LastWriteTimeUtc | select-object -last 1
|
||||
|
||||
if ($sestest -eq $null)
|
||||
{
|
||||
Write-Host "Could not find 'sestest.dll' within $PSScriptRoot\out" -ForegroundColor Red
|
||||
Write-Host "Do you need to run a build?" -ForegroundColor Yellow
|
||||
exit -1
|
||||
}
|
||||
|
||||
|
||||
# Uncomment this line to show which exe is being run
|
||||
# Write-Output "Launching $sestest"
|
||||
|
||||
dotnet $sestest $args
|
||||
dotnet $sestest $args
|
||||
|
|
Загрузка…
Ссылка в новой задаче