26 lines
840 B
Bash
26 lines
840 B
Bash
#!/usr/bin/env bash
|
|
# SPDX-License-Identifier: MIT
|
|
# Key the native wxWidgets prefix to its tracked source and build toolchain.
|
|
set -euo pipefail
|
|
|
|
material="$({
|
|
git rev-parse HEAD:thirdparty/wxwidgets/wxWidgets-3.3.3
|
|
git rev-parse HEAD:scripts/build-wx-linux.sh
|
|
cat thirdparty/wx-rs/VERSION
|
|
gcc -dumpmachine
|
|
gcc -dumpfullversion
|
|
pkg-config --modversion gtk+-3.0
|
|
mapfile -t modules < <(pkg-config --list-all | awk '{print $1}' | LC_ALL=C sort -u)
|
|
for module in "${modules[@]}"; do
|
|
printf '%s=%s\n' "$module" "$(pkg-config --modversion "$module" 2>/dev/null || printf unavailable)"
|
|
done
|
|
getconf GNU_LIBC_VERSION
|
|
} )"
|
|
digest="$(printf '%s\n' "$material" | sha256sum | cut -c1-24)"
|
|
key="wx-3.3.3-$digest"
|
|
if [ -n "${GITHUB_OUTPUT:-}" ]; then
|
|
printf 'key=%s\n' "$key" >> "$GITHUB_OUTPUT"
|
|
else
|
|
printf '%s\n' "$key"
|
|
fi
|