mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
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 !
15 lines
491 B
Batchfile
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 gitlab --code %2 %3 %4 %5 %6 %7 %8 %9
|
|
) else (
|
|
node "%WEKAN_ROOT%\tools\mirror-active-forges.mjs" --target gitlab %FLAGS% %*
|
|
)
|
|
exit /b %ERRORLEVEL%
|