From a5b35c377dd8a863522f87e1fb98f205243da3d1 Mon Sep 17 00:00:00 2001 From: Frostebite Date: Fri, 13 Aug 2021 21:19:17 +0100 Subject: [PATCH] Improving cache logging --- dist/remote-builder/handleCaching.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dist/remote-builder/handleCaching.sh b/dist/remote-builder/handleCaching.sh index e4aee295..5ab44e18 100755 --- a/dist/remote-builder/handleCaching.sh +++ b/dist/remote-builder/handleCaching.sh @@ -20,19 +20,17 @@ if [ -d "$libraryFolderFull" ]; then echo "!Warning!: The Unity library was included in the git repository (this isn't usually a good practice)" fi -echo "Checking cache" - # Restore library cache latestLibraryCacheFile=$(ls -t "$libraryCacheFolder" | grep .zip$ | head -1) -if [ ! -z "$latestLibraryCacheFile" ]; then - echo "Library cache exists from build $latestLibraryCacheFile from $branch" +echo "Checking if $libraryCacheFolder/$latestLibraryCacheFile exists from $branch" +if [ ! -z "$libraryCacheFolder/$latestLibraryCacheFile" ]; then + echo "Library cache exists" mkdir -p "$libraryFolderFull" unzip -q "$libraryCacheFolder/$latestLibraryCacheFile" -d "$libraryFolderFull" fi -echo "Checking cache for a cache match based on the combined large files hash ($lfsCacheFolder/$LFS_ASSETS_HASH.zip)" - +echo "Checking large file cache exists ($lfsCacheFolder/$LFS_ASSETS_HASH.zip)" if [ -f "$lfsCacheFolder/$LFS_ASSETS_HASH.zip" ]; then echo "Match found: using large file hash match $LFS_ASSETS_HASH.zip" latestLFSCacheFile="$LFS_ASSETS_HASH"