cleanup git cloning

pull/273/head
Frostebite 2021-07-13 01:01:24 +01:00
parent 8639a6a8b9
commit e5318094ff
4 changed files with 17 additions and 36 deletions

10
dist/index.js vendored
View File

@ -2101,7 +2101,6 @@ class RemoteBuilder {
apk add sort
apk add cut
apk add tree
#
mkdir ${buildPathFull}
mkdir ${builderPathFull}
mkdir ${repoPathFull}
@ -2114,7 +2113,14 @@ class RemoteBuilder {
git clone --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
git clone ${repo2} ${steamPathFull}
#
${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA
export GIT_LFS_SKIP_SMUDGE=1
#
git clone --filter=blob:none ${repo3} ${repoPathFull} $GITHUB_SHA
#
export GIT_LFS_SKIP_SMUDGE=0
#
cd ${repoPathFull}
git lfs ls-files -l | cut -d ' ' -f1 | sort > lfs-assets-id
${builderPathFull}/dist/remote-builder/setupCache.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull}
${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}
#

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,31 +0,0 @@
#!/bin/sh
repoPathFull=$1
cloneUrl=$2
githubSha=$3
cd $repoPathFull
echo ' '
echo "Cloning the repository being built:"
# DISABLE LFS
export GIT_LFS_SKIP_SMUDGE=1
# Init new repo and setup origin
git init
git remote add origin $cloneUrl
# Get remote version
git fetch origin
git reset --hard $githubSha
# ENABLE LFS
export GIT_LFS_SKIP_SMUDGE=0
tree
echo ' '
# List git lfs files
git lfs ls-files --all
echo ' '
git lfs ls-files -l | cut -d ' ' -f1 | sort
echo ' '
git lfs ls-files -l | cut -d ' ' -f1 | sort > $1/.lfs-assets-id
echo ' '

View File

@ -111,7 +111,6 @@ class RemoteBuilder {
apk add sort
apk add cut
apk add tree
#
mkdir ${buildPathFull}
mkdir ${builderPathFull}
mkdir ${repoPathFull}
@ -124,7 +123,14 @@ class RemoteBuilder {
git clone --branch "remote-builder/unified-providers" ${repo} ${builderPathFull}
git clone ${repo2} ${steamPathFull}
#
${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA
export GIT_LFS_SKIP_SMUDGE=1
#
git clone --filter=blob:none ${repo3} ${repoPathFull} $GITHUB_SHA
#
export GIT_LFS_SKIP_SMUDGE=0
#
cd ${repoPathFull}
git lfs ls-files -l | cut -d ' ' -f1 | sort > lfs-assets-id
${builderPathFull}/dist/remote-builder/setupCache.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull}
${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}
#