Skip to content

Commit ca3d770

Browse files
Support running in GitHub Actions
As part of the upstream workflow, we check out this repository within a subdirectory. This patch supports that scenario based on the `$CI` environment variable.
1 parent e257107 commit ca3d770

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

prep-tot-protocol-files.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/bin/bash
22
set -x
33

4-
# Machine-specific path, naturally
54
local_script_path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6-
protocol_repo_path="$local_script_path/../devtools-protocol"
5+
if [ -n $CI ]; then
6+
# https://github.com/ChromeDevTools/devtools-protocol/blob/HEAD/.github/workflows/update.yml
7+
protocol_repo_path="$local_script_path/.."
8+
else
9+
# Assume `devtools-protocol` lives alongside `debugger-protocol-viewer`.
10+
protocol_repo_path="$local_script_path/../devtools-protocol"
11+
fi
712

813
browser_protocol_path="$protocol_repo_path/json/browser_protocol.json"
914
js_protocol_path="$protocol_repo_path/json/js_protocol.json"

0 commit comments

Comments
 (0)