-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAnalyzeOthers.ps1
167 lines (136 loc) · 4.92 KB
/
AnalyzeOthers.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
function AnalyzeProject ( $url ){
Write-Host "Analyzing " $url
Push-Location ..
$name = $url.Split('/')[-1]
if($name -eq "") {
$name = $url.Split('/')[-2]
}
Write-Host "Analyzing " $name
$analyzerPath = Get-Location
$copyPath = Join-Path $analyzerPath 'src'
$copyPath = Join-Path $copyPath 'documentation1'
$copyPath = Join-Path $copyPath 'docs'
$copyPath = Join-Path $copyPath 'analysis'
$copyPath = Join-Path $copyPath $name
if(-not (Test-Path $copyPath)) {
New-Item -ItemType Directory -Path $copyPath
$jsonContent = @"
{
"label": "$name",
"position": 1,
"link": {
"type": "generated-index"
}
}
"@
# Specify the file path where you want to save the JSON content
$filePath = Join-Path $copyPath '_category_.json'
# Write the JSON content to the file
Set-Content -Path $filePath -Value $jsonContent
}
Write-Host "Analyzing " $name
if(-not (Test-Path $name)) {
git clone $url
}
cd $name
$currentPath = Get-Location
$sln = (Get-ChildItem *.sln -r)
Write-Host "found $($sln.Count) solutions"
$index=0
$sln | ForEach-Object {
$index++
Write-host $index "------>" $_.FullName
$solutionPath = Split-Path $_.FullName
Set-Location $solutionPath
Write-Host $solutionPath
gci *.sln
dotnet restore
dotnet build
dotnet new tool-manifest
dotnet tool uninstall netpackageanalyzerconsole
dotnet tool update netpackageanalyzerconsole
Write-Host "Current path: $(Get-Location)"
# Push-Location .
# dotnet PackageAnalyzer generateFiles -wg Docusaurus
dotnet PackageAnalyzer generateFiles -wg HtmlSummary
cd Analysis
cd docs
cd Analysis
$destination = Join-Path $copyPath $index
if(-not (Test-Path $destination)) {
New-Item -ItemType Directory -Path $destination
}
Copy-Item -Path * -Destination $destination -Recurse -Force
Write-Host "Finding name folder : $solutionPath from $name"
# $nameFolder = $solutionPath.Substring($solutionPath.IndexOf($name)+$name.Length+1).Replace('\', '_')
$nameFolder = $name
$jsonContent = @"
{
"label": "$nameFolder",
"position": 1,
"link": {
"type": "generated-index"
}
}
"@
$filePath = Join-Path $destination '_category_.json'
Set-Content -Path $filePath -Value $jsonContent
Write-Host "Please see : $destination"
#npm install
#npm run start
# $processInfo = Start-Process npm -ArgumentList "run", "start" -PassThru -NoNewWindow
#Start-Sleep -Milliseconds 30000
# Stop-Process -Id $processInfo.Id
# Set-Location $currentPath
}
Pop-Location
# cls
}
#done
# AnalyzeProject "https://github.com/fullstackhero/dotnet-starter-kit"
#done
# AnalyzeProject "https://github.com/ivanpaulovich/clean-architecture-manga"
#many sln
#$url ="https://github.com/evolutionary-architecture/evolutionary-architecture-by-example"
#done
# AnalyzeProject "https://github.com/jasontaylordev/CleanArchitecture"
#done
# AnalyzeProject "https://github.com/jbogard/ContosoUniversityDotNetCore-Pages"
#3 sln
# AnalyzeProject "https://github.com/dotnet/eShop"
#the project do not compile -errors
# $url="https://github.com/kgrzybek/modular-monolith-with-ddd"
# AnalyzeProject "https://github.com/nitish-kaushik/aspnetcore-webapi-clean-architecture"
# AnalyzeProject "https://github.com/nopSolutions/nopCommerce"
# AnalyzeProject "https://github.com/dotnetcore/CAP"
# AnalyzeProject "https://github.com/meysamhadeli/booking-microservices"
# AnalyzeProject "https://github.com/rafaelfgx/Architecture"
# AnalyzeProject "https://github.com/ardalis/CleanArchitecture"
AnalyzeProject "https://github.com/danpdc/cleanArchitectureTemplate"
#too old
#TODO AnalyzeProject "https://github.com/thangchung/clean-architecture-dotnet"
#too old
#TODO AnalyzeProject "https://github.com/jvandevelde/distributed-playground"
#done
# AnalyzeProject "https://github.com/asc-lab/dotnetcore-microservices-poc"
#done
# AnalyzeProject "https://github.com/Aaronontheweb/InMemoryCQRSReplication"
#too old
# AnalyzeProject "https://github.com/horsdal/microservices-in-dotnet-book-second-edition"
#not done
# AnalyzeProject "https://github.com/phongnguyend/Practical.CleanArchitecture"
#too old
# AnalyzeProject "https://github.com/thangchung/practical-dapr"
#done
# AnalyzeProject "https://github.com/EduardoPires/EquinoxProject/"
# AnalyzeProject "https://github.com/RickStrahl/AlbumViewerVNext/"
# AnalyzeProject "https://github.com/cecilphillip/aspnet-servicediscovery-patterns"
#AnalyzeProject "https://github.com/kgrzybek/sample-dotnet-core-cqrs-api"
# AnalyzeProject "https://github.com/abpframework/abp"
#TODO: https://github.com/topics/architecture?l=c%23&o=desc&s=stars
#does not generate code metrics, waiting for .net 9
# AnalyzeProject https://github.com/simplcommerce/SimplCommerce
#does not generate code metrics, waiting for .net 9
# AnalyzeProject https://github.com/grandnode/grandnode2
#just 1 project
#AnalyzeProject https://github.com/gothinkster/aspnetcore-realworld-example-app