wprof/get-commit-data.sh
Michel Lind 87447ce0ff
Also refresh vmlinux.h
Signed-off-by: Michel Lind <salimma@fedoraproject.org>
2026-08-25 16:42:32 +01:00

24 lines
586 B
Bash
Executable file

#!/bin/sh
WPROF_CHECKOUT=$1
pushd $1 >/dev/null
git submodule status --cached
echo if you see a '+',
echo first do a \`git submodule update --init --recursive\`
read
WPROF_COMMIT=$(git rev-parse HEAD)
echo %global wprof_commit ${WPROF_COMMIT}
for d in blazesym bpftool libbpf strobelight-libs usdt vmlinux.h; do
PREFIX=$(echo $d | sed -e 's|-|_|g' | sed -e 's|\.|_|g')
COMMIT=$(git -C $d rev-parse HEAD)
DATE=$(git -C $d show --no-patch --format=%cd --date=format:%Y%m%d)
echo %global ${PREFIX}_commit ${COMMIT}
echo %global ${PREFIX}_date ${DATE}
done
popd >/dev/null