File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,7 @@ releaseArtifacts
118
118
artifacts
119
119
! build /artifacts
120
120
src /Docker /** /content
121
+ src /PublicAPI.empty.txt
121
122
122
123
! ** /* .cake
123
124
.DS_Store
Original file line number Diff line number Diff line change
1
+ [CmdletBinding (PositionalBinding = $false )]
2
+ param ()
3
+
4
+ Set-StrictMode - version 2.0
5
+ $ErrorActionPreference = " Stop"
6
+
7
+ function MarkShipped ([string ]$dir ) {
8
+ $shippedFilePath = Join-Path $dir " PublicAPI.Shipped.txt"
9
+ $shipped = @ ()
10
+ $shipped += Get-Content $shippedFilePath
11
+
12
+ $unshippedFilePath = Join-Path $dir " PublicAPI.Unshipped.txt"
13
+ $unshipped = Get-Content $unshippedFilePath
14
+ $removed = @ ()
15
+ $removedPrefix = " *REMOVED*" ;
16
+ Write-Host " Processing $dir "
17
+
18
+ foreach ($item in $unshipped ) {
19
+ if ($item.Length -gt 0 ) {
20
+ if ($item.StartsWith ($removedPrefix )) {
21
+ $item = $item.Substring ($removedPrefix.Length )
22
+ $removed += $item
23
+ }
24
+ else {
25
+ $shipped += $item
26
+ }
27
+ }
28
+ }
29
+
30
+ $shipped | Sort-Object - Unique | Where-Object { -not $removed.Contains ($_ ) } | Out-File $shippedFilePath - Encoding Ascii
31
+ " #nullable enable" | Out-File " PublicAPI.empty.txt" - Encoding Ascii
32
+ Copy-Item ./ PublicAPI.empty.txt $unshippedFilePath
33
+ }
34
+
35
+ try {
36
+ foreach ($file in Get-ChildItem - re -in " PublicApi.Shipped.txt" ) {
37
+ $dir = Split-Path - parent $file
38
+ MarkShipped $dir
39
+ }
40
+ }
41
+ catch {
42
+ Write-Host $_
43
+ Write-Host $_.Exception
44
+ exit 1
45
+ }
You can’t perform that action at this time.
0 commit comments