Skip to content

Commit 4a58941

Browse files
author
Your Name
committed
feat: Release Please mit CHANGELOG eingerichtet und CI-Fix angewendet
1 parent 4f829cf commit 4a58941

4 files changed

Lines changed: 67 additions & 5 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: googleapis/release-please-action@v4
17+
with:
18+
token: ${{ secrets.GITHUB_TOKEN }}
19+
config-file: release-please-config.json
20+
manifest-file: .release-please-manifest.json

.release-please-manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"." : "0.1.0"}

release-please-config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"release-type": "simple",
4+
"packages": {
5+
".": {
6+
"changelog-sections": [
7+
{"type": "feat", "section": "Features / Neue Funktionen"},
8+
{"type": "fix", "section": "Bug Fixes / Fehlerbehebungen"},
9+
{"type": "docs", "section": "Documentation / Dokumentation"},
10+
{"type": "chore", "section": "Maintenance / Wartung", "hidden": false},
11+
{"type": "refactor", "section": "Refactoring", "hidden": true}
12+
]
13+
}
14+
}
15+
}

scripts/check-homogeneity.ps1

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
[CmdletBinding()]
55
param(
6-
[string]$TargetDir = $env:HOME,
6+
[string]$TargetDir = $(if ($env:HOME) { $env:HOME } else { $env:USERPROFILE }),
7+
[string]$WorkspaceName = '',
78
[switch]$Json,
89
[switch]$DryRun,
910
[string]$ApplyPatch = '',
@@ -150,7 +151,7 @@ function Check-ReadmeSections {
150151
} else {
151152
Emit-Result 'FAIL' 'README.md' 'Spec-kit section missing' $Dir
152153
}
153-
if ($content -match '(?im)^## .*Azubis') {
154+
if ($content -match '(?im)^## .*(Azubis|Auszubildende)') {
154155
Emit-Result 'PASS' 'README.md' 'Azubis section' $Dir
155156
} else {
156157
Emit-Result 'FAIL' 'README.md' 'Azubis section missing' $Dir
@@ -162,8 +163,10 @@ function Check-AnsiInScripts {
162163
$scriptsDir = Join-Path $Dir 'scripts'
163164
if (-not (Test-Path $scriptsDir)) { return }
164165
# ANSI escape scan: actual ESC byte, \033[, \e[ (PS1 uses .NET regex)
166+
# Exclude the scanner scripts themselves (they contain the patterns as literals in comments/code)
165167
$pattern = '\x1b\[|\\033\[|\\e\['
166168
$found = Get-ChildItem -Path $scriptsDir -File -Recurse -ErrorAction SilentlyContinue |
169+
Where-Object { $_.Name -notmatch '^check-homogeneity\.(ps1|sh)$' } |
167170
Where-Object { (Get-Content $_.FullName -Raw -ErrorAction SilentlyContinue) -match $pattern } |
168171
Select-Object -First 1
169172
if ($null -eq $found) {
@@ -289,14 +292,37 @@ foreach ($entry in $scanResults) {
289292
}
290293

291294
if ($level -eq 0) {
292-
$canonicalHook = Join-Path $env:HOME 'scripts/hooks/pre-push'
295+
$canonicalHook = Join-Path $dir 'scripts/hooks/pre-push'
293296
if (Test-Path $canonicalHook) {
294297
Emit-Result 'PASS' 'scripts/hooks/pre-push' 'canonical hook present' $dir
295298
} else {
296299
Emit-Result 'WARN' 'scripts/hooks/pre-push' 'canonical hook missing' $dir
297300
}
298301
}
299302

303+
# Level 0: Git Scope Isolation checks (GIT-SCOPE-001, GIT-SCOPE-002)
304+
if ($level -eq 0) {
305+
$homeDir2 = $(if ($env:HOME) { $env:HOME } else { $env:USERPROFILE })
306+
$gitconfigD2 = Join-Path $homeDir2 '.gitconfig.d'
307+
$gitconfig2 = Join-Path $homeDir2 '.gitconfig'
308+
if (-not (Test-Path $gitconfigD2)) {
309+
if ($Json) {
310+
Write-Host '{"check":"GIT-SCOPE-001","status":"WARN","message":"~/.gitconfig.d/ fehlt — Scope-Isolierung nicht konfiguriert / missing — scope isolation not configured"}'
311+
}
312+
Emit-Result 'WARN' '~/.gitconfig.d/' `
313+
'~/.gitconfig.d/ fehlt — Scope-Isolierung nicht konfiguriert / missing — scope isolation not configured' `
314+
$dir
315+
} elseif (-not ((Get-Content $gitconfig2 -ErrorAction SilentlyContinue) |
316+
Select-String -SimpleMatch 'gitdir:~/home-baseline-tmp/' -Quiet)) {
317+
if ($Json) {
318+
Write-Host '{"check":"GIT-SCOPE-002","status":"WARN","message":"includeIf für home-baseline-tmp nicht gefunden / not found for home-baseline-tmp"}'
319+
}
320+
Emit-Result 'WARN' '~/.gitconfig' `
321+
'includeIf für home-baseline-tmp nicht gefunden / not found for home-baseline-tmp' `
322+
$dir
323+
}
324+
}
325+
300326
# .editorconfig for C# Level-2 (FR-REV-E02)
301327
if ($level -eq 2) {
302328
Check-EditorconfigCsharp -Dir $dir
@@ -349,15 +375,15 @@ if ($Json) {
349375
$ls = if ($lt -gt 0) { [int](($lp * 100) / $lt) } else { 0 }
350376
$filled = [int]($ls * 10 / 100)
351377
$bar = ('' * $filled) + ('' * (10 - $filled))
352-
$shortName = $d -replace [regex]::Escape($env:HOME), '~'
378+
$shortName = $d -replace [regex]::Escape($(if ($env:HOME) { $env:HOME } else { $env:USERPROFILE })), '~'
353379
Write-Host ("{0,-30} [{1}] {2,3} % ({3}/{4} checks)" -f $shortName, $bar, $ls, $lp, $lt)
354380
}
355381

356382
Write-Host ""
357383
Write-Host ("Overall: $OverallScore % | Workspaces: $WorkspacesCount | Projects: $ProjectsCount")
358384

359385
if (-not $DryRun) {
360-
Write-Host "STATS.md updated: $env:HOME/STATS.md"
386+
Write-Host "STATS.md updated: $(if ($env:HOME) { $env:HOME } else { $env:USERPROFILE })/STATS.md"
361387
}
362388

363389
$fc = $Failures.Count; $wc = $Warnings.Count

0 commit comments

Comments
 (0)