correcting cache script parameter names

pull/273/head
Frostebite 2021-07-31 21:44:53 +01:00
parent 20b845b591
commit e12185be81
4 changed files with 20 additions and 20 deletions

8
dist/index.js vendored
View File

@ -2157,8 +2157,8 @@ class RemoteBuilder {
const repo2 = `https://${buildParameters.githubToken}@github.com/game-ci/steam-deploy.git`;
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
const cloneRemoteBuilderSourceCommand = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
const cachePullGitLargeFilesAndLibraryFolder = `${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
const initializeSourceRepoForCaching = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
const handleCaching = `${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
` apk update
apk add unzip
@ -2180,10 +2180,10 @@ class RemoteBuilder {
#
echo ' '
echo 'Cloning main repo'
${cloneRemoteBuilderSourceCommand}
${initializeSourceRepoForCaching}
echo ' '
echo 'cache pull'
${cachePullGitLargeFilesAndLibraryFolder}
${handleCaching}
#
echo ' '
echo 'Tree for the folder of this specific build:'

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -1,25 +1,25 @@
#!/bin/sh
cacheDir=$1
cacheFolderFull=$1
branchName=$2
libDir=$3
libraryFolderFull=$3
purgeRemoteBuilderCache=$4
echo ""
echo "Caching starting, parameters:"
echo "$cacheDir"
echo "$cacheFolderFull"
echo "$branchName"
echo "$libDir"
echo "$libraryFolderFull"
echo "$purgeRemoteBuilderCache"
echo ""
# handle library cache
if [ ! -d "$cacheFolderFull" ]; then
mkdir "$cacheFolderFull"
echo "creating new cache folder $cacheFolderFull"
mkdir "$cacheFolderFull"
if [ ! -d "$cacheFolderFull/$branchName" ]; then
mkdir "$cacheFolderFull/$branchName"
echo "creating new cache branch folder for: $cacheFolderFull/$branchName"
mkdir "$cacheFolderFull/$branchName"
else
echo "cache branch folder already exists for: $cacheFolderFull/$branchName"
fi
@ -28,11 +28,11 @@ else
fi
echo "Library cache for branch: $branchName"
ls $cacheFolderFull/$branchName
ls "$cacheFolderFull/$branchName"
echo ''
if [ -d "$libraryFolderFull" ]; then
rm -r $libraryFolderFull
rm -r "$libraryFolderFull"
echo "Git must ignore the Library folder"
fi
@ -44,8 +44,8 @@ latest=$(ls -t $cacheDir | head -1)
if [ ! -z "$latest" ]; then
echo "Library cache exists from build $latest from $branchName"
echo 'Creating empty Library folder for cache'
mkdir $libDir
unzip -q $latest -d $libDir
mkdir "$libraryFolderFull"
unzip -q "$latest" -d "$libraryFolderFull"
else
echo 'Cache does not exist'
fi
@ -54,6 +54,6 @@ fi
# purge cache
if [ "$purgeRemoteBuilderCache" == "true" ]; then
rm -r $libDir
rm -r "$libraryFolderFull"
fi

View File

@ -100,8 +100,8 @@ class RemoteBuilder {
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
const cloneRemoteBuilderSourceCommand = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
const cachePullGitLargeFilesAndLibraryFolder = `${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
const initializeSourceRepoForCaching = `${builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${repoPathFull} ${repo3} $GITHUB_SHA`;
const handleCaching = `${builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${libraryFolderFull} ${purgeRemoteCache}`;
await this.RemoteBuilderProviderPlatform.runBuildTask(
buildUid,
'alpine/git',
@ -126,10 +126,10 @@ class RemoteBuilder {
#
echo ' '
echo 'Cloning main repo'
${cloneRemoteBuilderSourceCommand}
${initializeSourceRepoForCaching}
echo ' '
echo 'cache pull'
${cachePullGitLargeFilesAndLibraryFolder}
${handleCaching}
#
echo ' '
echo 'Tree for the folder of this specific build:'