Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scan-vulnerable-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:

steps:
- name: Setup .NET
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
10.0.*

- name: Git checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/verify-code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ jobs:

steps:
- name: Setup .NET
uses: actions/setup-dotnet@v5
uses: actions/setup-dotnet@v6
with:
dotnet-version: |
10.0.*

- name: Git checkout
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
persist-credentials: false
fetch-depth: 2
Expand All @@ -44,7 +44,7 @@ jobs:
run: dotnet restore ${{ env.SOLUTION_FILE }} /p:Configuration=Release /p:NuGetAudit=false --verbosity minimal

- name: Build
run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release /p:RunAnalyzers=false
run: dotnet build ${{ env.SOLUTION_FILE }} --no-restore --configuration Release /p:RunAnalyzers=false /p:GeneratePackageOnBuild=false

- name: CleanupCode (on PR diff)
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -57,12 +57,12 @@ jobs:

Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash in pull request."
dotnet jb cleanupcode --version
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false;GeneratePackageOnBuild=false" --jb --verbosity=WARN -f commits -a $headCommitHash -b $baseCommitHash --fail-on-diff --print-diff

- name: CleanupCode (on branch)
if: ${{ github.event_name == 'push' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
shell: pwsh
run: |
Write-Output 'Running code cleanup on all files.'
dotnet jb cleanupcode --version
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN --fail-on-diff --print-diff
dotnet regitlint -s $env:SOLUTION_FILE --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false;GeneratePackageOnBuild=false" --jb --verbosity=WARN --fail-on-diff --print-diff
8 changes: 4 additions & 4 deletions cleanupcode.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $solutionFile = 'Steeltoe.NetCoreToolService.slnx'

dotnet tool restore
dotnet restore $solutionFile /p:NuGetAudit=false
dotnet build $solutionFile --no-restore --configuration Release /p:RunAnalyzers=false
dotnet build $solutionFile --no-restore --configuration Release /p:RunAnalyzers=false /p:GeneratePackageOnBuild=false

if ($revision) {
$headCommitHash = git rev-parse HEAD
Expand All @@ -22,16 +22,16 @@ if ($revision) {
if ($baseCommitHash -eq $headCommitHash) {
Write-Output "Running code cleanup on staged/unstaged files."
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN -f staged,modified
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false;GeneratePackageOnBuild=false" --jb --verbosity=WARN -f staged,modified
}
else {
Write-Output "Running code cleanup on commit range $baseCommitHash..$headCommitHash, including staged/unstaged files."
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --max-runs=5 --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false;GeneratePackageOnBuild=false" --jb --verbosity=WARN -f staged,modified,commits -a $headCommitHash -b $baseCommitHash
}
}
else {
Write-Output "Running code cleanup on all files."
dotnet jb cleanupcode --version
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:Configuration=Release --jb --properties:RunAnalyzers=false --jb --properties:NuGetAudit=false --jb --verbosity=WARN
dotnet regitlint -s $solutionFile --print-command --skip-tool-check --jb --dotnetcoresdk=$(dotnet --version) --jb-profile="Steeltoe Full Cleanup" --jb --no-updates --jb --properties:"Configuration=Release;RunAnalyzers=false;NuGetAudit=false;GeneratePackageOnBuild=false" --jb --verbosity=WARN
}
Loading