Files
wekan/releases/mirror-github.bat
T
Lauri Ojansivu e79ec61bcc Windows: build.bat and the releases\ batch files keep every file in .tools\ too.
releases\tools-env.bat is the counterpart of releases/tools-env.sh: TEMP,
TMP and TMPDIR in .tools\tmp, npm's cache and global installs, Go's caches
and the Playwright browsers in .tools\, METEOR_WAREHOUSE_DIR at
.tools\.meteor once Meteor is there, and those tools first on PATH, so no
user or system PATH setting has to change. build.bat and every
releases\ batch file call it; the bundle launchers (start-wekan.bat) do
not, as they run a finished bundle where there is no .tools\.

build.bat's install option no longer installs a system-wide Node.js with
Chocolatey: it unpacks the Dockerfile's version from nodejs.org's zip
into .tools\node-v<version>-win-<arch>, verified against SHASUMS256.txt
first, and Meteor goes into .tools\.meteor (LOCALAPPDATA is .tools for the
installer only). build-bundle-win64.bat works in .tools\tmp\win64-bundle-
<version> and says where the zip is. tools-env.sh also keeps Go's caches
and the Playwright browsers in .tools/, as tools-env.bat does.

tests/toolsDirOnly.test.cjs pins tools-env.bat, its callers and the .tools
install; tests/buildScriptParity.test.cjs reads the Playwright directory
and Node.js version from their new places.

Thanks to xet7 !
2026-10-27 23:53:23 +02:00

15 lines
491 B
Batchfile

@echo off
setlocal
for %%I in ("%~dp0..") do set "WEKAN_ROOT=%%~fI"
REM TEMP, TMP, npm and Go in .tools\ (releases\tools-env.bat).
call "%~dp0tools-env.bat"
set "PATH=%WEKAN_ROOT%\.tools\bin;%GOBIN%;%PATH%"
set "FLAGS=--apply --code"
if "%~1"=="--preview" (
set "FLAGS=--code"
node "%WEKAN_ROOT%\tools\mirror-active-forges.mjs" --target github --code %2 %3 %4 %5 %6 %7 %8 %9
) else (
node "%WEKAN_ROOT%\tools\mirror-active-forges.mjs" --target github %FLAGS% %*
)
exit /b %ERRORLEVEL%