bazel: fix running jpsToBazel from the community repository only

GitOrigin-RevId: f1077ab09a4481a49d1d9901b150d3d22d32acb1
This commit is contained in:
Leonid Shalupov
2025-07-25 00:15:29 +00:00
committed by intellij-monorepo-bot
parent da90d62b6e
commit 719c314f78
3 changed files with 15 additions and 5 deletions
+7 -3
View File
@@ -8,11 +8,15 @@ set -eu
export RUN_WITHOUT_ULTIMATE_ROOT=true
script_dir="$(cd "$(dirname "$0")"; pwd)"
exec /bin/bash "$script_dir/../platform/build-scripts/bazel/jps-to-bazel.cmd" "$@"
cd "$script_dir/../platform/build-scripts/bazel"
exec /bin/bash "../../../bazel.cmd" run "$@" //:jps-to-bazel
:CMDSCRIPT
set RUN_WITHOUT_ULTIMATE_ROOT=true
call "%~dp0..\platform\build-scripts\bazel\jps-to-bazel.cmd" %*
EXIT /B %ERRORLEVEL%
pushd "%~dp0..\platform\build-scripts\bazel"
call "..\..\..\bazel.cmd" run //:jps-to-bazel <nul
set _exit_code=%ERRORLEVEL%
popd
EXIT /B %_exit_code%
@@ -5,6 +5,10 @@ set -e -u -o pipefail
root="$(cd "$(dirname "$0")/../../../../../.."; pwd)"
# Provide packages.jetbrains.team credentials for Bazel in .netrc
"$root/build/private-packages-auth/authorizer.sh"
# The script will be missing if run from community repository
authorizer="$root/build/private-packages-auth/authorizer.sh"
if [ -f "$authorizer" ]; then
"$authorizer"
fi
exec "$BAZEL_REAL" "$@"
@@ -4,7 +4,9 @@ setlocal
REM Provide packages.jetbrains.team credentials for Bazel in .netrc
set ULTIMATE_ROOT=%~dp0%..\..\..\..\..\..
call "%ULTIMATE_ROOT%\build\private-packages-auth\authorizer.cmd"
set AUTHORIZER=%ULTIMATE_ROOT%\build\private-packages-auth\authorizer.cmd
REM The script will be missing if run from community repository
if exist "%AUTHORIZER%" call "%AUTHORIZER%"
if errorlevel 1 exit /b %ERRORLEVEL%
"%BAZEL_REAL%" %*