md5 library folder

pull/273/head
Frostebite 2021-07-01 22:30:52 +01:00
parent 86c7320386
commit 52e756a174
3 changed files with 13 additions and 5 deletions

8
dist/index.js vendored
View File

@ -2080,6 +2080,7 @@ class RemoteBuilder {
static SetupStep(buildUid, buildParameters, branchName, defaultSecretsArray) {
return __awaiter(this, void 0, void 0, function* () {
core.info('Starting step 1/4 clone and restore cache)');
const projectPathFull = `/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}`;
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
`apk update;
apk add unzip;
@ -2110,13 +2111,16 @@ class RemoteBuilder {
echo "Cached Libraries for ${branchName} from previous builds:"
ls
echo ''
ls "/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}"
libDir="/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}/Library"
ls "${projectPathFull}"
libDir="/${projectPathFull}/Library"
if [ -d "$libDir" ]; then
rm -r "$libDir"
echo "Setup .gitignore to ignore Library folder and remove it from builds"
fi
echo 'Checking cache'
find "${projectPathFull}/Library" -type f -exec md5sum "{}" + > libraryCache.chk
ls
cat libraryCache.chk
# Restore cache
latest=$(ls -t | head -1)
if [ ! -z "$latest" ]; then

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -87,6 +87,7 @@ class RemoteBuilder {
defaultSecretsArray: RemoteBuilderSecret[],
) {
core.info('Starting step 1/4 clone and restore cache)');
const projectPathFull = `/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}`;
await this.RemoteBuilderProviderPlatform.runBuildTask(
buildUid,
'alpine/git',
@ -122,13 +123,16 @@ class RemoteBuilder {
echo "Cached Libraries for ${branchName} from previous builds:"
ls
echo ''
ls "/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}"
libDir="/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/${buildParameters.projectPath}/Library"
ls "${projectPathFull}"
libDir="/${projectPathFull}/Library"
if [ -d "$libDir" ]; then
rm -r "$libDir"
echo "Setup .gitignore to ignore Library folder and remove it from builds"
fi
echo 'Checking cache'
find "${projectPathFull}/Library" -type f -exec md5sum "{}" + > libraryCache.chk
ls
cat libraryCache.chk
# Restore cache
latest=$(ls -t | head -1)
if [ ! -z "$latest" ]; then