fix
parent
d436f9aff5
commit
2a1be295f4
|
|
@ -1,29 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
cacheFolderFull=$1
|
cacheFolderFull=$1
|
||||||
cacheKey=$2
|
branch=$2
|
||||||
libraryFolderFull=$3
|
libraryFolderFull=$3
|
||||||
gitLFSDestinationFolder=$4
|
gitLFSDestinationFolder=$4
|
||||||
purgeRemoteBuilderCache=$5
|
purgeRemoteBuilderCache=$5
|
||||||
LFS_ASSETS_HASH=$6
|
LFS_ASSETS_HASH=$6
|
||||||
|
|
||||||
cacheFolderWithBranch="$cacheFolderFull/$cacheKey"
|
cacheFolderWithBranch="$cacheFolderFull/$branch"
|
||||||
lfsCacheFolder="$cacheFolderFull/$cacheKey/lfs"
|
lfsCacheFolder="$cacheFolderFull/$branch/lfs"
|
||||||
libraryCacheFolder="$cacheFolderFull/$cacheKey/lib"
|
libraryCacheFolder="$cacheFolderFull/$branch/lib"
|
||||||
|
|
||||||
echo ' '
|
|
||||||
|
|
||||||
echo "LFS cache for branch: $cacheKey"
|
|
||||||
mkdir -p "$lfsCacheFolder"
|
mkdir -p "$lfsCacheFolder"
|
||||||
ls -lh "$lfsCacheFolder"
|
|
||||||
|
|
||||||
echo ' '
|
|
||||||
|
|
||||||
echo "Library cache for branch: $cacheKey"
|
|
||||||
mkdir -p "$libraryCacheFolder"
|
mkdir -p "$libraryCacheFolder"
|
||||||
ls -lh "$libraryCacheFolder"
|
|
||||||
|
|
||||||
echo ' '
|
|
||||||
|
|
||||||
# if the unity git project has included the library delete it and echo a warning
|
# if the unity git project has included the library delete it and echo a warning
|
||||||
if [ -d "$libraryFolderFull" ]; then
|
if [ -d "$libraryFolderFull" ]; then
|
||||||
|
|
@ -37,7 +26,7 @@ echo "Checking cache"
|
||||||
latestLibraryCacheFile=$(ls -t "$libraryCacheFolder" | grep .zip$ | head -1)
|
latestLibraryCacheFile=$(ls -t "$libraryCacheFolder" | grep .zip$ | head -1)
|
||||||
|
|
||||||
if [ ! -z "$latestLibraryCacheFile" ]; then
|
if [ ! -z "$latestLibraryCacheFile" ]; then
|
||||||
echo "Library cache exists from build $latestLibraryCacheFile from $cacheKey"
|
echo "Library cache exists from build $latestLibraryCacheFile from $branch"
|
||||||
mkdir -p "$libraryFolderFull"
|
mkdir -p "$libraryFolderFull"
|
||||||
unzip "$libraryCacheFolder/$latestLibraryCacheFile" -d "$libraryFolderFull"
|
unzip "$libraryCacheFolder/$latestLibraryCacheFile" -d "$libraryFolderFull"
|
||||||
fi
|
fi
|
||||||
|
|
@ -54,21 +43,28 @@ fi
|
||||||
|
|
||||||
|
|
||||||
if [ ! -f "$lfsCacheFolder/$latestLFSCacheFile" ]; then
|
if [ ! -f "$lfsCacheFolder/$latestLFSCacheFile" ]; then
|
||||||
echo "LFS cache exists from build $latestLFSCacheFile from $cacheKey"
|
echo "LFS cache exists from build $latestLFSCacheFile from $branch"
|
||||||
rm -r "$gitLFSDestinationFolder"
|
rm -r "$gitLFSDestinationFolder"
|
||||||
mkdir -p "$gitLFSDestinationFolder"
|
mkdir -p "$gitLFSDestinationFolder"
|
||||||
unzip "$lfsCacheFolder/$latestLFSCacheFile" -d "$gitLFSDestinationFolder"
|
unzip "$lfsCacheFolder/$latestLFSCacheFile" -d "$gitLFSDestinationFolder"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Size of LFS cache folder for this branch'
|
echo "LFS cache for branch: $branch"
|
||||||
|
ls -lh "$lfsCacheFolder"
|
||||||
|
echo ' '
|
||||||
|
echo "Library cache for branch: $branch"
|
||||||
|
ls -lh "$libraryCacheFolder"
|
||||||
|
echo ' '
|
||||||
|
echo "Size of LFS cache folder for branch: $branch"
|
||||||
du -sch "$lfsCacheFolder"
|
du -sch "$lfsCacheFolder"
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Size of Library cache folder for this branch'
|
echo "Size of Library cache folder for branch: $branch"
|
||||||
du -sch "$libraryCacheFolder"
|
du -sch "$libraryCacheFolder"
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Size of cache folder for this branch'
|
echo "Size of cache folder for branch: $branch"
|
||||||
du -sch "$cacheFolderWithBranch"
|
du -sch "$cacheFolderWithBranch"
|
||||||
echo ' '
|
echo ' '
|
||||||
echo 'Size of cache folder'
|
echo 'Size of cache folder'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue