3131 with :
3232 path : |
3333 "~/.cache/bazel"
34- key : bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', '**/*.cpp', '**/*.h', '**/*.rs') }}
34+ key : " bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', '**/*.cpp', '**/*.h', '**/*.rs') }}"
3535 restore-keys : bazel-cache-
3636 - uses : bazelbuild/setup-bazelisk@v2
3737 - name : Test lib
6868 with :
6969 path : |
7070 "~/.cache/bazel"
71- key : bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', '**/*.cpp', '**/*.h', '**/*.rs') }}
71+ key : " bazel-cache-${{ hashFiles('**/BUILD.bazel', '**/*.bzl', 'WORKSPACE', '**/*.cpp', '**/*.h', '**/*.rs') }}"
7272 restore-keys : bazel-cache-
7373 - uses : bazelbuild/setup-bazelisk@v2
7474 - name : Build npm package
@@ -112,7 +112,7 @@ jobs:
112112 with :
113113 path : |
114114 "~/.cache/bazel"
115- key : bazel-cache-${{ matrix.os }}-py${{ matrix.python-version }}
115+ key : " bazel-cache-${{ matrix.os }}-py${{ matrix.python-version }}"
116116 - uses : bazelbuild/setup-bazelisk@v2
117117 - name : Build wheel
118118 run : |
@@ -123,17 +123,24 @@ jobs:
123123 WHEEL_FILE="rtbot.whl"
124124 if [ -f "$WHEEL_FILE" ]; then
125125 # Extract version from wheel metadata
126- VERSION=$(python -c "
127- import zipfile, re
128- with zipfile.ZipFile('$WHEEL_FILE', 'r') as z :
126+ export WHEEL_FILE="rtbot.whl"
127+ VERSION=$(python - <<'EOF'
128+ import os, zipfile
129+
130+ wheel = os.environ["WHEEL_FILE"]
131+ with zipfile.ZipFile(wheel, 'r') as z :
129132 for name in z.namelist() :
130133 if '.dist-info/METADATA' in name :
131- # Extract version from rtbot-VERSION.dist-info/METADATA
132134 dist_info_dir = name.split('/')[0]
133- version = dist_info_dir.replace('rtbot-', '').replace('.dist-info', '')
134- print(version)
135+ print(
136+ dist_info_dir
137+ .replace('rtbot-', '')
138+ .replace('.dist-info', '')
139+ )
135140 break
136- " )
141+ EOF
142+ )
143+
137144 # Determine platform tag
138145 if [ "${{ runner.os }}" = "Linux" ]; then
139146 PLATFORM="manylinux2014_x86_64"
0 commit comments