From 5d1b2362d2b48f17d66f3763cf0636fd51118097 Mon Sep 17 00:00:00 2001 From: Dmitriy Fofanov Date: Mon, 23 Feb 2026 14:29:24 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3:=20=D0=BE=D0=BF=D1=82=D0=B8=D0=BC?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D1=81=D0=BA=D1=80=D0=B8?= =?UTF-8?q?=D0=BF=D1=82=D0=B0=20=D1=81=D0=B8=D0=BD=D1=85=D1=80=D0=BE=D0=BD?= =?UTF-8?q?=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8=20=D0=B2=D0=B8=D0=BA=D0=B8?= =?UTF-8?q?=20=D0=B2=20Makefile.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Makefile | 23 +---------------------- build/.wiki-sync | 1 + 2 files changed, 2 insertions(+), 22 deletions(-) create mode 160000 build/.wiki-sync diff --git a/Makefile b/Makefile index 894c2d6..39de61e 100644 --- a/Makefile +++ b/Makefile @@ -521,28 +521,7 @@ release-local: checksum ifeq ($(OS),Windows_NT) wiki-update: $(info >>> Синхронизация wiki в Gitea...) - if (-Not (Test-Path 'wiki')) { throw 'Папка wiki/ не найдена.' } - $$origin = git remote get-url origin - if (-not $$origin) { throw 'Не найден remote origin.' } - if ($$origin -match '\.git$$') { $$wikiUrl = $$origin -replace '\.git$$', '.wiki.git' } else { $$wikiUrl = "$$origin.wiki.git" } - $$tmp = '$(BUILD_DIR)\\.wiki-sync' - Remove-Item -Recurse -Force $$tmp -ErrorAction SilentlyContinue - New-Item -ItemType Directory -Force '$(BUILD_DIR)' | Out-Null - git clone --depth 1 $$wikiUrl $$tmp - robocopy wiki $$tmp /MIR /XD .git | Out-Null; if ($$LASTEXITCODE -gt 7) { throw 'Ошибка robocopy при синхронизации wiki.' } - Push-Location $$tmp - git add -A - if (git diff --cached --quiet) { - $(info >>> Изменений в wiki нет.) - Pop-Location - } else { - git config user.name "wiki-sync-bot" - git config user.email "wiki-sync@local" - git commit -m "docs(wiki): sync from main repo" - git push origin HEAD - Pop-Location - $(info >>> Wiki успешно обновлена.) - } + @$$ErrorActionPreference = "Stop"; if (-Not (Test-Path "wiki")) { throw "wiki/ folder not found." }; $$origin = git remote get-url origin; if (-not $$origin) { throw "origin remote not found." }; if ($$origin -match "\.git$$") { $$wikiUrl = $$origin -replace "\.git$$", ".wiki.git" } else { $$wikiUrl = "$$origin.wiki.git" }; $$tmp = "$(BUILD_DIR)\\.wiki-sync"; Remove-Item -Recurse -Force $$tmp -ErrorAction SilentlyContinue; New-Item -ItemType Directory -Force "$(BUILD_DIR)" | Out-Null; git clone --depth 1 $$wikiUrl $$tmp; robocopy wiki $$tmp /MIR /XD .git | Out-Null; if ($$LASTEXITCODE -gt 7) { throw "robocopy failed while syncing wiki." }; Push-Location $$tmp; git add -A; git diff --cached --quiet; if ($$LASTEXITCODE -eq 0) { Write-Host "No wiki changes."; Pop-Location; exit 0 }; git config user.name "wiki-sync-bot"; git config user.email "wiki-sync@local"; git commit -m "docs(wiki): sync from main repo"; git push origin HEAD; Pop-Location; Write-Host "Wiki synced successfully." else wiki-update: $(info >>> Синхронизация wiki в Gitea...) diff --git a/build/.wiki-sync b/build/.wiki-sync new file mode 160000 index 0000000..556b793 --- /dev/null +++ b/build/.wiki-sync @@ -0,0 +1 @@ +Subproject commit 556b793e26d35ac8e8874abd0a24e12cf3ba61df