diff options
| author | Lena <lena@omega> | 2026-07-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-07-01 00:00:00 +0000 |
| commit | e89c2290de133104420b02da3b7453a25484429d (patch) | |
| tree | c78ca81aa319a2c1e3084b16a46e404310f96a19 | |
| parent | 9f832c148fdd3d9d3e4673e89d2d052c2bcd1efa (diff) | |
| download | scrcpy-android-e89c2290de133104420b02da3b7453a25484429d.tar.gz | |
test: derive the docker image tag from the rig inputs
The tag suffix had to be bumped by hand whenever the Dockerfile or
sdk-packages.txt changed; forgetting meant silently testing against
a stale image. Hash the two files into the tag so any edit
invalidates the cache automatically.
| -rwxr-xr-x | test | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -16,9 +16,9 @@ set -eu ROOT="$(cd "$(dirname "$0")" && pwd)" -# Bump the tag suffix whenever test-rig/Dockerfile or sdk-packages.txt -# changes; otherwise a stale cached image keeps being used. -IMG="scrcpy-android-test:5" +# The image tag is a hash of the rig inputs, so editing the Dockerfile +# or the SDK package list automatically invalidates the cached image. +IMG="scrcpy-android-test:$(cat "$ROOT/test-rig/Dockerfile" "$ROOT/test-rig/sdk-packages.txt" | sha256sum | cut -c1-12)" cmd="${1:-unit}" case "$cmd" in |