Skip to content

Commit 8ad9c4c

Browse files
committed
fix: clean up whitespace in YAML and PowerShell scripts
1 parent 058817a commit 8ad9c4c

File tree

3 files changed

+49
-47
lines changed

3 files changed

+49
-47
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
needs: build
7979
runs-on: windows-latest
8080
if: startsWith(github.ref, 'refs/tags/v')
81-
81+
8282
steps:
8383
- uses: actions/checkout@v4
8484

@@ -98,18 +98,18 @@ jobs:
9898
run: |
9999
$version = "${{ github.ref }}" -replace 'refs/tags/v', ''
100100
$release = Invoke-RestMethod -Uri "https://api.github.com/repos/${{ github.repository }}/releases/tags/v$version"
101-
101+
102102
# Get checksums from release assets or calculate them
103103
$winX64Asset = $release.assets | Where-Object { $_.name -eq "dotnet-api-diff-win-x64.zip" }
104104
$winArm64Asset = $release.assets | Where-Object { $_.name -eq "dotnet-api-diff-win-arm64.zip" }
105-
105+
106106
# Download assets and calculate checksums
107107
Invoke-WebRequest -Uri $winX64Asset.browser_download_url -OutFile "win-x64.zip"
108108
Invoke-WebRequest -Uri $winArm64Asset.browser_download_url -OutFile "win-arm64.zip"
109-
109+
110110
$checksumX64 = (Get-FileHash "win-x64.zip" -Algorithm SHA256).Hash.ToLower()
111111
$checksumArm64 = (Get-FileHash "win-arm64.zip" -Algorithm SHA256).Hash.ToLower()
112-
112+
113113
echo "version=$version" >> $env:GITHUB_OUTPUT
114114
echo "checksum_x64=$checksumX64" >> $env:GITHUB_OUTPUT
115115
echo "checksum_arm64=$checksumArm64" >> $env:GITHUB_OUTPUT
@@ -125,29 +125,29 @@ jobs:
125125
needs: build
126126
runs-on: ubuntu-latest
127127
if: startsWith(github.ref, 'refs/tags/v')
128-
128+
129129
steps:
130130
- uses: actions/checkout@v4
131131

132132
- name: Get release assets and checksums
133133
id: release_info
134134
run: |
135135
VERSION=${GITHUB_REF#refs/tags/v}
136-
136+
137137
# Get release information
138138
RELEASE_JSON=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/tags/v$VERSION")
139-
139+
140140
# Download assets and calculate checksums
141141
wget -q $(echo "$RELEASE_JSON" | jq -r '.assets[] | select(.name=="dotnet-api-diff-osx-arm64.tar.gz") | .browser_download_url') -O osx-arm64.tar.gz
142142
wget -q $(echo "$RELEASE_JSON" | jq -r '.assets[] | select(.name=="dotnet-api-diff-osx-x64.tar.gz") | .browser_download_url') -O osx-x64.tar.gz
143143
wget -q $(echo "$RELEASE_JSON" | jq -r '.assets[] | select(.name=="dotnet-api-diff-linux-arm64.tar.gz") | .browser_download_url') -O linux-arm64.tar.gz
144144
wget -q $(echo "$RELEASE_JSON" | jq -r '.assets[] | select(.name=="dotnet-api-diff-linux-x64.tar.gz") | .browser_download_url') -O linux-x64.tar.gz
145-
145+
146146
OSX_ARM64_SHA256=$(sha256sum osx-arm64.tar.gz | cut -d' ' -f1)
147147
OSX_X64_SHA256=$(sha256sum osx-x64.tar.gz | cut -d' ' -f1)
148148
LINUX_ARM64_SHA256=$(sha256sum linux-arm64.tar.gz | cut -d' ' -f1)
149149
LINUX_X64_SHA256=$(sha256sum linux-x64.tar.gz | cut -d' ' -f1)
150-
150+
151151
echo "version=$VERSION" >> $GITHUB_OUTPUT
152152
echo "osx_arm64_sha256=$OSX_ARM64_SHA256" >> $GITHUB_OUTPUT
153153
echo "osx_x64_sha256=$OSX_X64_SHA256" >> $GITHUB_OUTPUT

packaging/chocolatey/dotnetapidiff.nuspec

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
3-
<metadata>
4-
<id>dotnetapidiff</id>
5-
<version>$version$</version>
6-
<packageSourceUrl>https://github.com/jbrinkman/dotnet-api-diff</packageSourceUrl>
7-
<owners>jbrinkman</owners>
8-
<title>DotNet API Diff</title>
9-
<authors>Josh Brinkman</authors>
10-
<projectUrl>https://github.com/jbrinkman/dotnet-api-diff</projectUrl>
11-
<iconUrl>https://raw.githubusercontent.com/jbrinkman/dotnet-api-diff/main/icon.png</iconUrl>
12-
<copyright>2025 Josh Brinkman</copyright>
13-
<licenseUrl>https://github.com/jbrinkman/dotnet-api-diff/blob/main/LICENSE</licenseUrl>
14-
<requireLicenseAcceptance>false</requireLicenseAcceptance>
15-
<projectSourceUrl>https://github.com/jbrinkman/dotnet-api-diff</projectSourceUrl>
16-
<docsUrl>https://github.com/jbrinkman/dotnet-api-diff/blob/main/README.md</docsUrl>
17-
<bugTrackerUrl>https://github.com/jbrinkman/dotnet-api-diff/issues</bugTrackerUrl>
18-
<tags>dotnet api diff compare assembly compatibility breaking-changes cli tool</tags>
19-
<summary>A command-line tool for comparing .NET assemblies and detecting API differences and breaking changes.</summary>
20-
<description><![CDATA[
3+
<metadata>
4+
<id>dotnetapidiff</id>
5+
<version>$version$</version>
6+
<packageSourceUrl>https://github.com/jbrinkman/dotnet-api-diff</packageSourceUrl>
7+
<owners>jbrinkman</owners>
8+
<title>DotNet API Diff</title>
9+
<authors>Josh Brinkman</authors>
10+
<projectUrl>https://github.com/jbrinkman/dotnet-api-diff</projectUrl>
11+
<iconUrl>https://raw.githubusercontent.com/jbrinkman/dotnet-api-diff/main/icon.png</iconUrl>
12+
<copyright>2025 Josh Brinkman</copyright>
13+
<licenseUrl>https://github.com/jbrinkman/dotnet-api-diff/blob/main/LICENSE</licenseUrl>
14+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
15+
<projectSourceUrl>https://github.com/jbrinkman/dotnet-api-diff</projectSourceUrl>
16+
<docsUrl>https://github.com/jbrinkman/dotnet-api-diff/blob/main/README.md</docsUrl>
17+
<bugTrackerUrl>https://github.com/jbrinkman/dotnet-api-diff/issues</bugTrackerUrl>
18+
<tags>dotnet api diff compare assembly compatibility breaking-changes cli tool</tags>
19+
<summary>A command-line tool for comparing .NET assemblies and detecting API differences and breaking changes.</summary>
20+
<description><![CDATA[
2121
DotNet API Diff is a powerful command-line tool designed to compare .NET assemblies and identify API differences, including breaking changes. It's particularly useful for library maintainers, API designers, and development teams who need to ensure backward compatibility when releasing new versions of their .NET libraries.
2222
2323
## Features
@@ -58,10 +58,10 @@ dotnetapidiff compare old-assembly.dll new-assembly.dll --output json
5858
```
5959
6060
For more information, visit the project repository at https://github.com/jbrinkman/dotnet-api-diff
61-
]]></description>
62-
<releaseNotes>See release notes at https://github.com/jbrinkman/dotnet-api-diff/releases</releaseNotes>
63-
</metadata>
64-
<files>
65-
<file src="tools\**" target="tools" />
66-
</files>
61+
]]> </description>
62+
<releaseNotes>See release notes at https://github.com/jbrinkman/dotnet-api-diff/releases</releaseNotes>
63+
</metadata>
64+
<files>
65+
<file src="tools\**" target="tools" />
66+
</files>
6767
</package>

scripts/build-chocolatey.ps1

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
param(
44
[Parameter(Mandatory = $true)]
55
[string]$Version,
6-
6+
77
[Parameter(Mandatory = $true)]
88
[string]$ChecksumX64,
9-
9+
1010
[Parameter(Mandatory = $true)]
1111
[string]$ChecksumArm64,
12-
12+
1313
[Parameter(Mandatory = $false)]
1414
[string]$ApiKey,
15-
15+
1616
[Parameter(Mandatory = $false)]
1717
[switch]$Publish
1818
)
@@ -52,37 +52,39 @@ $installScriptContent | Set-Content (Join-Path $buildDir "tools/chocolateyinstal
5252
Push-Location $buildDir
5353
try {
5454
$nupkgFile = "dotnetapidiff.$Version.nupkg"
55-
55+
5656
Write-Host "Creating Chocolatey package..."
5757
choco pack dotnetapidiff.nuspec
58-
58+
5959
if (-not (Test-Path $nupkgFile)) {
6060
throw "Package creation failed - $nupkgFile not found"
6161
}
62-
62+
6363
Write-Host "Package created successfully: $nupkgFile"
64-
64+
6565
if ($Publish) {
6666
if (-not $ApiKey) {
6767
throw "API key is required for publishing"
6868
}
69-
69+
7070
Write-Host "Publishing package to Chocolatey..."
7171
choco push $nupkgFile --api-key $ApiKey
7272
Write-Host "Package published successfully!"
73-
} else {
73+
}
74+
else {
7475
Write-Host "Package built but not published (use -Publish flag to publish)"
7576
}
76-
77+
7778
# Copy package to artifacts directory
7879
$artifactsDir = Join-Path $rootDir "artifacts"
7980
if (-not (Test-Path $artifactsDir)) {
8081
New-Item -ItemType Directory -Path $artifactsDir -Force | Out-Null
8182
}
8283
Copy-Item $nupkgFile $artifactsDir -Force
8384
Write-Host "Package copied to artifacts directory"
84-
85-
} finally {
85+
86+
}
87+
finally {
8688
Pop-Location
8789
}
8890

0 commit comments

Comments
 (0)