Skip to content

Commit 8e2c0c6

Browse files
committed
Fixing build scripts to use pwsh and to call GenerateMetadataSource.ps1, rather than .cmd
1 parent 236f7c3 commit 8e2c0c6

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

build.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@ECHO OFF
2-
powershell.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0scripts\build.ps1""" -build %*"
2+
pwsh.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0scripts\build.ps1""" -build %*"
33
EXIT /B %ERRORLEVEL%

pack.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@ECHO OFF
2-
powershell.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0scripts\build.ps1""" -pack %*"
2+
pwsh.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0scripts\build.ps1""" -pack %*"
33
EXIT /B %ERRORLEVEL%

restore.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@ECHO OFF
2-
powershell.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0scripts\build.ps1""" -restore %*"
2+
pwsh.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0scripts\build.ps1""" -restore %*"
33
EXIT /B %ERRORLEVEL%

scripts/build.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,25 +103,25 @@ function Test-Win32Metadata {
103103
$clangSharpPInvokeGeneratorBinaries = (Get-ChildItem -Path "$clangSharpPInvokeGeneratorOutputDir" -File).FullName
104104
Copy-Item -Path $clangSharpPInvokeGeneratorBinaries -Destination "$win32MetadataToolsDir"
105105

106-
$generateMetadataSourceCmd = Join-Path -Path $win32MetadataDir -ChildPath "GenerateMetadataSource.cmd"
107-
& "$generateMetadataSourceCmd"
106+
$generateMetadataSourcePs1 = Join-Path -Path $win32MetadataDir -ChildPath "scripts\GenerateMetadataSource.ps1"
107+
& "$generateMetadataSourcePs1"
108108

109109
if ($LastExitCode -ne 0) {
110-
throw "'GenerateMetadataSource.cmd' failed"
110+
throw "'GenerateMetadataSource.ps1' failed"
111111
}
112112

113-
$buildMetadataBinCmd = Join-Path -Path $win32MetadataDir -ChildPath "BuildMetadataBin.cmd"
114-
& "$buildMetadataBinCmd"
113+
$buildMetadataBinPs1 = Join-Path -Path $win32MetadataDir -ChildPath "scripts\BuildMetadataBin.ps1"
114+
& "$buildMetadataBinPs1"
115115

116116
if ($LastExitCode -ne 0) {
117-
throw "'BuildMetadataBin.cmd' failed"
117+
throw "'BuildMetadataBin.ps1' failed"
118118
}
119119

120-
$testMetdataBinCmd = Join-Path -Path $win32MetadataDir -ChildPath "TestMetadataBin.cmd"
121-
& "$testMetdataBinCmd"
120+
$testWinmdBinaryPs1 = Join-Path -Path $win32MetadataDir -ChildPath "scripts\TestWinmdBinary.ps1"
121+
& "$testWinmdBinaryPs1"
122122

123123
if ($LastExitCode -ne 0) {
124-
throw "'TestMetadataBin.cmd' failed"
124+
throw "'TestWinmdBinary.ps1' failed"
125125
}
126126
}
127127
finally {

scripts/cibuild.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@ECHO OFF
2-
powershell.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0build.ps1""" -ci %*"
2+
pwsh.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0build.ps1""" -ci %*"
33
EXIT /B %ERRORLEVEL%

test.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
@ECHO OFF
2-
powershell.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0scripts\build.ps1""" -test %*"
2+
pwsh.exe -NoLogo -NoProfile -ExecutionPolicy ByPass -Command "& """%~dp0scripts\build.ps1""" -test %*"
33
EXIT /B %ERRORLEVEL%

0 commit comments

Comments
 (0)