Skip to content

Commit 1dfbfaf

Browse files
author
Josef Pihrt
authored
Migrate scripts to PowerShell (#6)
1 parent bbbee52 commit 1dfbfaf

10 files changed

+61
-109
lines changed

ChangeLog.md

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- Rename `master` to `main`.
1313
- Migrate to a new csproj format.
1414
- Change target frameworks to .NET Standard 2.0 and .NET Framework 4.6.2.
15+
- Migrate scripts to PowerShell.
1516
- Format changelog according to 'keep a changelog' ([#4](https://github.com/josefpihrt/dotmarkdown/pull/4)).
1617

1718
-----

tools/build.cmd

-21
This file was deleted.

tools/build.debug.cmd

-19
This file was deleted.

tools/build.debug.ps1

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
dotnet build "../src/LinqToRegex.sln" -c Debug -v n /fl /m
3+
4+
Write-Host "DONE"
5+
Read-Host

tools/build.ps1

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
dotnet clean "../src/LinqToRegex.sln"
3+
dotnet restore --force "../src/LinqToRegex.sln"
4+
dotnet build "..\src\LinqToRegex.sln" -c Release /p:TreatWarningsAsErrors=true,WarningsNotAsErrors=1591 -v n /fl /m
5+
6+
if(!$?) { Read-Host; Exit }
7+
8+
dotnet pack -c Release --no-build -v normal "../src/LinqToRegex/LinqToRegex.csproj"
9+
10+
Write-Host "DONE"
11+
Read-Host

tools/generate_documentation.cmd

-43
This file was deleted.

tools/generate_documentation.ps1

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
$msbuildPath = ./vswhere.exe -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
2+
$roslynatorExe="../../roslynator/src/CommandLine/bin/Debug/net48/roslynator"
3+
4+
dotnet restore "../../Roslynator/src/CommandLine.sln" -c Debug /p:RoslynatorCommandLine=true -v m
5+
& $msbuildPath "../../Roslynator/src/CommandLine.sln" /t:Build /p:Configuration=Debug,RoslynatorCommandLine=true /v:m /m
6+
7+
& $roslynatorExe generate-doc "../src/LinqToRegex.sln" `
8+
--properties "Configuration=Release" `
9+
--projects "LinqToRegex(netstandard2.0)" `
10+
--heading "LINQ to Regex Reference" `
11+
-o "../docs/api"
12+
13+
& $roslynatorExe list-symbols "../src/LinqToRegex.sln" `
14+
--properties "Configuration=Release" `
15+
--projects "LinqToRegex(netstandard2.0)" `
16+
--visibility public `
17+
--depth member `
18+
--ignored-parts containing-namespace assembly-attributes `
19+
--ignored-attributes System.Runtime.CompilerServices.InternalsVisibleToAttribute `
20+
--output "../docs/api.txt"
21+
22+
Write-Host "DONE"
23+
Read-Host

tools/roslynator_fix.cmd

-26
This file was deleted.

tools/roslynator_fix.ps1

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#dotnet tool install -g roslynator.dotnet.cli
2+
3+
$roslynatorPath="../../roslynator/src"
4+
5+
dotnet build "$roslynatorPath/CommandLine.sln" -c Debug -v m /m
6+
7+
roslynator fix "../src/LinqToRegex.sln" `
8+
--analyzer-assemblies `
9+
"$roslynatorPath/Analyzers.CodeFixes/bin/Debug/netstandard2.0/Roslynator.CSharp.Analyzers.dll" `
10+
"$roslynatorPath/Analyzers.CodeFixes/bin/Debug/netstandard2.0/Roslynator.CSharp.Analyzers.CodeFixes.dll" `
11+
"$roslynatorPath/Formatting.Analyzers.CodeFixes/bin/Debug/netstandard2.0/Roslynator.Formatting.Analyzers.dll" `
12+
"$roslynatorPath/Formatting.Analyzers.CodeFixes/bin/Debug/netstandard2.0/Roslynator.Formatting.Analyzers.CodeFixes.dll" `
13+
--format `
14+
--verbosity d `
15+
--file-log "roslynator.log" `
16+
--file-log-verbosity diag `
17+
--diagnostic-fix-map "RCS1155=Roslynator.RCS1155.OrdinalIgnoreCase" `
18+
--file-banner " Copyright (c) Josef Pihrt. All rights reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information."
19+
20+
Write-Host "DONE"
21+
Read-Host

tools/vswhere.exe

459 KB
Binary file not shown.

0 commit comments

Comments
 (0)