feat(templates): add gitea ci example

This commit is contained in:
csh
2025-12-22 16:25:43 +08:00
parent a52bb246ab
commit 9d059cf698
7 changed files with 281 additions and 1 deletions
+8
View File
@@ -80,6 +80,14 @@ copy /y "%SRC%\\.agents\\index.md" "%DEST_PREFIX%\\.agents\\index.md" >nul
if not exist "%DEST_PREFIX%\\templates" mkdir "%DEST_PREFIX%\\templates"
if exist "%SRC%\\templates\\ci" (
xcopy "%SRC%\\templates\\ci\\*" "%DEST_PREFIX%\\templates\\ci\\" /e /i /y >nul
if errorlevel 1 (
echo ERROR: failed to copy templates\\ci
exit /b 1
)
)
set "LANGS_CSV="
for %%L in (%LANGS%) do (
echo %%~L| findstr /r "[\\/]" >nul && (
+5
View File
@@ -81,6 +81,11 @@ Copy-Item (Join-Path $Src ".agents/index.md") (Join-Path $AgentsDir "index.md")
$TemplatesDir = Join-Path $DestPrefix "templates"
New-Item -ItemType Directory -Path $TemplatesDir -Force | Out-Null
$ciTplSrc = Join-Path (Join-Path $Src "templates") "ci"
if (Test-Path $ciTplSrc) {
Copy-Item $ciTplSrc $TemplatesDir -Recurse -Force
}
foreach ($lang in $Langs) {
$docsSrc = Join-Path (Join-Path $Src "docs") $lang
if (-not (Test-Path $docsSrc)) { throw "Docs not found for lang=$lang ($docsSrc)" }
+3
View File
@@ -81,6 +81,9 @@ mkdir -p "$DEST_PREFIX/.agents"
cp "$SRC/.agents/index.md" "$DEST_PREFIX/.agents/index.md"
mkdir -p "$DEST_PREFIX/templates"
if [ -d "$SRC/templates/ci" ]; then
cp -R "$SRC/templates/ci" "$DEST_PREFIX/templates/"
fi
old_ifs="${IFS}"
IFS=', '