Switch from naming our cache directories based on inode to naming them based on the absolute path, so we don't blow the cache 100% of the time on travis

pull/912/head
Jesse Vincent 4 years ago
parent 2b209a1fe5
commit 8150eec669
No known key found for this signature in database
GPG Key ID: CC228463465E40BC

@ -19,6 +19,12 @@ set -e
###### Build and output configuration ###### Build and output configuration
###### ######
absolute_filename() {
echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
}
build_version () { build_version () {
GIT_VERSION="$(cd "$(find_sketch)"; if [ -d .git ]; then echo -n '-g' && git describe --abbrev=4 --dirty --always; fi)" GIT_VERSION="$(cd "$(find_sketch)"; if [ -d .git ]; then echo -n '-g' && git describe --abbrev=4 --dirty --always; fi)"
LIB_PROPERTIES_PATH="${LIB_PROPERTIES_PATH:-"../.."}" LIB_PROPERTIES_PATH="${LIB_PROPERTIES_PATH:-"../.."}"
@ -26,9 +32,9 @@ build_version () {
} }
build_paths() { build_paths() {
# We don't really want to use find # We need that echo because we\re piping to cksum
# shellcheck disable=SC2012 # shellcheck disable=SC2005
SKETCH_IDENTIFIER="$(ls -id "$(find_sketch)/${SKETCH}.ino" | cut -d ' ' -f 1)-${SKETCH}.ino" SKETCH_IDENTIFIER="$(echo "$(absolute_filename "$(find_sketch)/${SKETCH}.ino")" | cksum | cut -d ' ' -f 1)-${SKETCH}.ino"
KALEIDOSCOPE_TEMP_PATH="${KALEIDOSCOPE_TEMP_PATH:-${TMPDIR:-/tmp}/kaleidoscope-${USER}}" KALEIDOSCOPE_TEMP_PATH="${KALEIDOSCOPE_TEMP_PATH:-${TMPDIR:-/tmp}/kaleidoscope-${USER}}"

Loading…
Cancel
Save