Skip to content

Commit

Permalink
revert changes to compare script
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaTP committed Sep 11, 2023
1 parent 759d68f commit b140c28
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions it/compare-generation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $tmpFolder1 = New-TemporaryDirectory
$tmpFolder2 = New-TemporaryDirectory

Start-Process "$kiotaExec" -ArgumentList "generate --clean-output --language ${language} --openapi ${targetOpenapiPath} --dvr all --output $tmpFolder1" -Wait -NoNewWindow
Start-Process "src/kiota/bin/Debug/net7.0/kiota" -ArgumentList "generate --clean-output --language ${language} --openapi ${targetOpenapiPath} --dvr all --output $tmpFolder2" -Wait -NoNewWindow
Start-Process "$kiotaExec" -ArgumentList "generate --clean-output --language ${language} --openapi ${targetOpenapiPath} --dvr all --output $tmpFolder2" -Wait -NoNewWindow

# Remove variable output files
Remove-Item (Join-Path -Path $tmpFolder1 -ChildPath "kiota-lock.json")
Expand All @@ -81,10 +81,8 @@ Get-FileHash -InputStream ([IO.MemoryStream]::new([char[]]$HashString1))
$HashString2 = (Get-ChildItem $tmpFolder2 -Recurse | where { ! $_.PSIsContainer } | Get-FileHash -Algorithm MD5).Hash | Out-String
Get-FileHash -InputStream ([IO.MemoryStream]::new([char[]]$HashString2))

Write-Output "Folder Old: $tmpFolder1"
Write-Output "Folder New: $tmpFolder2"

diff --color -r "$tmpFolder1" "$tmpFolder2"
Write-Output "Folder 1: $tmpFolder1"
Write-Output "Folder 2: $tmpFolder2"

if ($HashString1 -eq $HashString2) {
Write-Output "The content of the folders is identical"
Expand Down

0 comments on commit b140c28

Please sign in to comment.