forked from dotnet/roslynator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve release build of command-line tool (dotnet#912)
- Loading branch information
1 parent
bc47c52
commit e5da43f
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# dotnet tool install -g orang.dotnet.cli | ||
|
||
$outDir = "../out/Release" | ||
|
||
New-Item -Path $outDir -ItemType directory | ||
Remove-Item "$outDir/Roslynator.CommandLine.*.nupkg" | ||
Remove-Item "$outDir/Roslynator.DotNet.Cli.*.nupkg" | ||
Remove-Item -Path "../src/CommandLine/bin/Release" -Recurse | ||
|
||
orang delete "../src" -a d -n "bin,obj" l li e -i "packages,node_modules" l li e ne -t n --content-only -y su s | ||
dotnet clean "../src/CommandLine.sln" ` | ||
|
||
dotnet publish "../src/CommandLine.sln" ` | ||
/p:Configuration=Release,RoslynatorCommandLine=true,Deterministic=true,TreatWarningsAsErrors=true,WarningsNotAsErrors="1591" ` | ||
/v:normal ` | ||
/m | ||
|
||
dotnet pack -c Release --no-build -v normal /p:RoslynatorCommandLine=true "../src/CommandLine/CommandLine.csproj" | ||
|
||
Copy-Item -Path "../src/CommandLine/bin/Release/Roslynator.CommandLine.*.nupkg" -Destination "$outDir" | ||
|
||
orang delete "../src" -a d -n "bin,obj" l li e -i "packages,node_modules" l li e ne -t n --content-only -y su s | ||
dotnet clean "../src/CommandLine.sln" ` | ||
|
||
dotnet pack "../src/CommandLine/CommandLine.csproj" -c Release -v normal ` | ||
/p:RoslynatorDotNetCli=true,Deterministic=true,TreatWarningsAsErrors=true,WarningsNotAsErrors="1591" | ||
|
||
Copy-Item -Path "../src/CommandLine/bin/Release/Roslynator.DotNet.Cli.*.nupkg" -Destination "$outDir" | ||
|
||
Write-Host OK |