Collect lfs file into .lfs-asset-id file and print
parent
3832949643
commit
2897eedefb
|
|
@ -2092,26 +2092,24 @@ class RemoteBuilder {
|
||||||
apk add unzip;
|
apk add unzip;
|
||||||
apk add git-lfs;
|
apk add git-lfs;
|
||||||
apk add jq;
|
apk add jq;
|
||||||
# Disable LFS
|
echo "Disable LFS"
|
||||||
git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
|
git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
|
||||||
git config --global filter.lfs.process "git-lfs filter-process --skip"
|
git config --global filter.lfs.process "git-lfs filter-process --skip"
|
||||||
# Get source repo for project to be built and game-ci repo for utilties
|
echo "Get source repo for project to be built and game-ci repo for utilties"
|
||||||
git clone https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git ${buildUid}/${repositoryFolder}
|
git clone https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git ${buildUid}/${repositoryFolder}
|
||||||
# Enable LFS
|
echo "Checkout"
|
||||||
|
git checkout $GITHUB_SHA --work-tree=${repoPathFull}
|
||||||
|
echo "Enable LFS"
|
||||||
|
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
|
||||||
|
git config --global filter.lfs.process "git-lfs filter-process"
|
||||||
|
echo "combine lfs hashes to one file, hash that"
|
||||||
git lfs ls-files -l --work-tree=${repoPathFull} | cut -d' ' -f1 | sort > .lfs-assets-id
|
git lfs ls-files -l --work-tree=${repoPathFull} | cut -d' ' -f1 | sort > .lfs-assets-id
|
||||||
ls
|
ls
|
||||||
cat libraryCache.chk
|
cat libraryCache.chk
|
||||||
# Get source repo for project to be built and game-ci repo for utilties
|
echo "Get game.ci/unity-builder and game.ci/steam-deploy"
|
||||||
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
|
|
||||||
git config --global filter.lfs.process "git-lfs filter-process"
|
|
||||||
cd ${buildUid}/${repositoryFolder}/
|
|
||||||
git lfs ls-files -l | cut -d' ' -f1 | sort > .assets-id
|
|
||||||
cd ../../
|
|
||||||
git clone https://${buildParameters.githubToken}@github.com/game-ci/unity-builder.git ${builderPathFull}
|
git clone https://${buildParameters.githubToken}@github.com/game-ci/unity-builder.git ${builderPathFull}
|
||||||
git clone https://${buildParameters.githubToken}@github.com/game-ci/steam-deploy.git ${steamPathFull}
|
git clone https://${buildParameters.githubToken}@github.com/game-ci/steam-deploy.git ${steamPathFull}
|
||||||
git checkout $GITHUB_SHA --work-tree=${repoPathFull}
|
# time to handle library cache
|
||||||
echo 'checking cache'
|
|
||||||
# Look for usable cache
|
|
||||||
if [ ! -d ${cacheFolderFull} ]; then
|
if [ ! -d ${cacheFolderFull} ]; then
|
||||||
mkdir ${cacheFolderFull}
|
mkdir ${cacheFolderFull}
|
||||||
echo "creating new cache folder"
|
echo "creating new cache folder"
|
||||||
|
|
@ -2120,15 +2118,14 @@ class RemoteBuilder {
|
||||||
mkdir ${cacheFolderFull}/${branchName}
|
mkdir ${cacheFolderFull}/${branchName}
|
||||||
echo "creating new cache branch folder for: ${branchName}"
|
echo "creating new cache branch folder for: ${branchName}"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "Library cache for branch: ${branchName}"
|
echo "Library cache for branch: ${branchName}"
|
||||||
ls ${cacheFolderFull}/${branchName}
|
ls ${cacheFolderFull}/${branchName}
|
||||||
echo ''
|
echo ''
|
||||||
if [ -d ${libraryFolderFull} ]; then
|
if [ -d ${libraryFolderFull} ]; then
|
||||||
rm -r ${libraryFolderFull}
|
rm -r ${libraryFolderFull}
|
||||||
echo "Setup .gitignore to ignore Library folder and remove it from builds"
|
echo "Git must ignore the Library folder"
|
||||||
fi
|
fi
|
||||||
echo 'Checking cache'
|
echo "Checking cache"
|
||||||
# Restore cache
|
# Restore cache
|
||||||
latest=$(ls -t | head -1)
|
latest=$(ls -t | head -1)
|
||||||
if [ ! -z "$latest" ]; then
|
if [ ! -z "$latest" ]; then
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -101,28 +101,26 @@ class RemoteBuilder {
|
||||||
apk add unzip;
|
apk add unzip;
|
||||||
apk add git-lfs;
|
apk add git-lfs;
|
||||||
apk add jq;
|
apk add jq;
|
||||||
# Disable LFS
|
echo "Disable LFS"
|
||||||
git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
|
git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
|
||||||
git config --global filter.lfs.process "git-lfs filter-process --skip"
|
git config --global filter.lfs.process "git-lfs filter-process --skip"
|
||||||
# Get source repo for project to be built and game-ci repo for utilties
|
echo "Get source repo for project to be built and game-ci repo for utilties"
|
||||||
git clone https://${buildParameters.githubToken}@github.com/${
|
git clone https://${buildParameters.githubToken}@github.com/${
|
||||||
process.env.GITHUB_REPOSITORY
|
process.env.GITHUB_REPOSITORY
|
||||||
}.git ${buildUid}/${repositoryFolder}
|
}.git ${buildUid}/${repositoryFolder}
|
||||||
# Enable LFS
|
echo "Checkout"
|
||||||
|
git checkout $GITHUB_SHA --work-tree=${repoPathFull}
|
||||||
|
echo "Enable LFS"
|
||||||
|
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
|
||||||
|
git config --global filter.lfs.process "git-lfs filter-process"
|
||||||
|
echo "combine lfs hashes to one file, hash that"
|
||||||
git lfs ls-files -l --work-tree=${repoPathFull} | cut -d' ' -f1 | sort > .lfs-assets-id
|
git lfs ls-files -l --work-tree=${repoPathFull} | cut -d' ' -f1 | sort > .lfs-assets-id
|
||||||
ls
|
ls
|
||||||
cat libraryCache.chk
|
cat libraryCache.chk
|
||||||
# Get source repo for project to be built and game-ci repo for utilties
|
echo "Get game.ci/unity-builder and game.ci/steam-deploy"
|
||||||
git config --global filter.lfs.smudge "git-lfs smudge -- %f"
|
|
||||||
git config --global filter.lfs.process "git-lfs filter-process"
|
|
||||||
cd ${buildUid}/${repositoryFolder}/
|
|
||||||
git lfs ls-files -l | cut -d' ' -f1 | sort > .assets-id
|
|
||||||
cd ../../
|
|
||||||
git clone https://${buildParameters.githubToken}@github.com/game-ci/unity-builder.git ${builderPathFull}
|
git clone https://${buildParameters.githubToken}@github.com/game-ci/unity-builder.git ${builderPathFull}
|
||||||
git clone https://${buildParameters.githubToken}@github.com/game-ci/steam-deploy.git ${steamPathFull}
|
git clone https://${buildParameters.githubToken}@github.com/game-ci/steam-deploy.git ${steamPathFull}
|
||||||
git checkout $GITHUB_SHA --work-tree=${repoPathFull}
|
# time to handle library cache
|
||||||
echo 'checking cache'
|
|
||||||
# Look for usable cache
|
|
||||||
if [ ! -d ${cacheFolderFull} ]; then
|
if [ ! -d ${cacheFolderFull} ]; then
|
||||||
mkdir ${cacheFolderFull}
|
mkdir ${cacheFolderFull}
|
||||||
echo "creating new cache folder"
|
echo "creating new cache folder"
|
||||||
|
|
@ -131,15 +129,14 @@ class RemoteBuilder {
|
||||||
mkdir ${cacheFolderFull}/${branchName}
|
mkdir ${cacheFolderFull}/${branchName}
|
||||||
echo "creating new cache branch folder for: ${branchName}"
|
echo "creating new cache branch folder for: ${branchName}"
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "Library cache for branch: ${branchName}"
|
echo "Library cache for branch: ${branchName}"
|
||||||
ls ${cacheFolderFull}/${branchName}
|
ls ${cacheFolderFull}/${branchName}
|
||||||
echo ''
|
echo ''
|
||||||
if [ -d ${libraryFolderFull} ]; then
|
if [ -d ${libraryFolderFull} ]; then
|
||||||
rm -r ${libraryFolderFull}
|
rm -r ${libraryFolderFull}
|
||||||
echo "Setup .gitignore to ignore Library folder and remove it from builds"
|
echo "Git must ignore the Library folder"
|
||||||
fi
|
fi
|
||||||
echo 'Checking cache'
|
echo "Checking cache"
|
||||||
# Restore cache
|
# Restore cache
|
||||||
latest=$(ls -t | head -1)
|
latest=$(ls -t | head -1)
|
||||||
if [ ! -z "$latest" ]; then
|
if [ ! -z "$latest" ]; then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue