Skip to content

Commit

Permalink
devops: fix goma startup on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
aslushnikov committed Feb 9, 2021
1 parent db633c4 commit 206432c
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions browser_patches/chromium/goma.sh
Expand Up @@ -20,7 +20,11 @@ if [[ $1 == "--help" ]]; then
echo "$(basename $0) [login|start|stop|--help]"
exit 0
elif [[ $1 == "login" ]]; then
python ./third_party/goma/goma_auth.py login
if [[ $(uname) == "MINGW"* ]]; then
/c/Windows/System32/cmd.exe "/c $(cygpath -w $(pwd)/third_party/goma/goma_auth.bat) login"
else
python ./third_party/goma/goma_auth.py login
fi
elif [[ $1 == "start" ]]; then
# We have to prefix ENV with `PLAYWRIGHT` since `GOMA_` env variables
# have special treatment by goma.
Expand All @@ -32,9 +36,17 @@ elif [[ $1 == "start" ]]; then
echo "run '$(basename $0) login'"
exit 1
fi
python ./third_party/goma/goma_ctl.py ensure_start
if [[ $(uname) == "MINGW"* ]]; then
/c/Windows/System32/cmd.exe "/c $(cygpath -w $(pwd)/third_party/goma/goma_ctl.bat) ensure_start"
else
python ./third_party/goma/goma_ctl.py ensure_start
fi
elif [[ $1 == "stop" ]]; then
python ./third_party/goma/goma_ctl.py stop
if [[ $(uname) == "MINGW"* ]]; then
/c/Windows/System32/cmd.exe "/c $(cygpath -w $(pwd)/third_party/goma/goma_ctl.bat) stop"
else
python ./third_party/goma/goma_ctl.py stop
fi
else
echo "ERROR: unknown command - $1"
echo "Use --help to list all available commands"
Expand Down

0 comments on commit 206432c

Please sign in to comment.