read latest library cache correctly

pull/273/head
Frostebite 2021-07-31 21:52:37 +01:00
parent e12185be81
commit 84c1ad2ca0
3 changed files with 5 additions and 5 deletions

2
dist/index.js vendored
View File

@ -2179,7 +2179,7 @@ class RemoteBuilder {
echo 'Cloned ${repo2}'
#
echo ' '
echo 'Cloning main repo'
echo 'Cloning main repo without LFS'
${initializeSourceRepoForCaching}
echo ' '
echo 'cache pull'

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -5,14 +5,14 @@ branchName=$2
libraryFolderFull=$3
purgeRemoteBuilderCache=$4
echo ""
echo " "
echo "Caching starting, parameters:"
echo "$cacheFolderFull"
echo "$branchName"
echo "$libraryFolderFull"
echo "$purgeRemoteBuilderCache"
echo ""
echo " "
# handle library cache
if [ ! -d "$cacheFolderFull" ]; then
echo "creating new cache folder $cacheFolderFull"
@ -40,7 +40,7 @@ fi
echo "Checking cache"
# Restore library cache
latest=$(ls -t $cacheDir | head -1)
latest=$(ls -t "$cacheFolderFull/$branchName" | head -1)
if [ ! -z "$latest" ]; then
echo "Library cache exists from build $latest from $branchName"
echo 'Creating empty Library folder for cache'