-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompile.ps1
More file actions
19 lines (18 loc) · 790 Bytes
/
Compile.ps1
File metadata and controls
19 lines (18 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Compile.ps1
$fInput = Read-Host "LINUX or WINDOWS? (type the answer in CAPITAL LETTERS)"
$filePath = "Module1.cs"
if ($fInput -eq "WINDOWS") {
$text = Get-Content $filePath -Raw
$newText = $text -replace "//Do not delete this comment! \(You can delete the above comments though\)", "#define BUILDTYPE_WINDOWS"
Set-Content -Path $filePath -Value $newText
dotnet publish GOOMBAServer.sln --runtime win-x86
}
elseif ($fInput -eq "LINUX") {
$text = Get-Content $filePath -Raw
$newText = $text -replace "#define BUILDTYPE_WINDOWS", "//Do not delete this comment! (You can delete the above comments though)"
Set-Content -Path $filePath -Value $newText
dotnet publish GOOMBAServer.sln --runtime ubuntu.16.04-x64
}
else {
Write-Host "ERROR while compiling"
}