Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Jun 25, 2024
1 parent edbb69e commit db09163
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/CI.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$error.clear()

$repoPath = "$PSScriptRoot/../.."
try{
try {
mkdir $repoPath/build -ErrorAction Ignore | Out-Null
Import-Module $repoPath -Force | Write-Host
Set-ps12exeContextMenu 1
Expand All @@ -10,25 +10,25 @@ try{
& $repoPath/build/ps12exe.exe $repoPath/ps12exe.ps1 $repoPath/build/ps12exe2.exe -verbose | Write-Host
"'Hello World!'" | ps12exe -outputFile $repoPath/build/hello.exe -verbose | Write-Host
& $repoPath/build/ps12exe2.exe -Content '$PSEXEpath;$PSScriptRoot' -outputFile $repoPath/build/pathtest.exe | Write-Host
$pathresult=. $repoPath/build/pathtest.exe
$pathresultshouldbe=@("$repoPath/build/pathtest.exe","$repoPath/build")
$pathresult = . $repoPath/build/pathtest.exe
$pathresultshouldbe = @("$repoPath/build/pathtest.exe", "$repoPath/build")
# 在路径层面比较 $pathresult 和 $pathresultshouldbe
if($pathresult.Count -ne $pathresultshouldbe.Count){
if ($pathresult.Count -ne $pathresultshouldbe.Count) {
Write-Error "pathresult.Count -ne pathresultshouldbe.Count"
}
for($i=0;$i -lt $pathresult.Count;$i++){
$path1=[System.IO.Path]::GetFullPath($pathresult[$i])
$path2=[System.IO.Path]::GetFullPath($pathresultshouldbe[$i])
if($path1 -ne $path2){
for ($i = 0; $i -lt $pathresult.Count; $i++) {
$path1 = [System.IO.Path]::GetFullPath($pathresult[$i])
$path2 = [System.IO.Path]::GetFullPath($pathresultshouldbe[$i])
if ($path1 -ne $path2) {
Write-Error "$path1 -ne $path2"
}
}
& $repoPath/build/hello.exe | Write-Host
Set-ps12exeContextMenu 0
Remove-Item $repoPath/build -Recurse -Force
}catch{}
} catch {}

if($error){
if ($error) {
Write-Output "::group::PSVersion"
Write-Output $PSVersionTable
Write-Output "::endgroup::"
Expand Down

0 comments on commit db09163

Please sign in to comment.