Files
chipyard/.circleci/create-hash.sh
Albert Ou a6b8301f0f ci: Increment toolchain cache keys to clear cache
Generate hashfiles from normalized output of git-submodule status.
(Interestingly, the old method also worked after submodule flattening.)
2019-10-02 13:16:03 -07:00

23 lines
571 B
Bash
Executable File

#!/bin/bash
# get the hash of riscv-tools
# turn echo on and error on earliest command
set -ex
set -o pipefail
# get shared variables
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
source $SCRIPT_DIR/defaults.sh
# enter bhd repo
cd $LOCAL_CHIPYARD_DIR
# Use normalized output of git-submodule status as hashfile
for tools in 'riscv-tools' 'esp-tools' ; do
git submodule status "toolchains/${tools}" | while read -r line ; do
echo "${line#[!0-9a-f]}"
done > "${HOME}/${tools}.hash"
done
echo "Hashfile for riscv-tools and esp-tools created in $HOME"