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