Try more verbosity to see what's really happening
parent
faff46aead
commit
f6fc5c14a8
File diff suppressed because one or more lines are too long
|
@ -2,13 +2,14 @@ import Input from './input';
|
|||
import Unity from './unity';
|
||||
|
||||
const tc = require('@actions/tool-cache');
|
||||
const exec = require('@actions/exec');
|
||||
const core = require('@actions/core');
|
||||
|
||||
class Cache {
|
||||
static get libraryKey() {
|
||||
const { projectPath } = Input.getFromUser();
|
||||
const { projectPath, targetPlatform } = Input.getFromUser();
|
||||
|
||||
return `alwaysthesame`;
|
||||
return `${projectPath}-${targetPlatform}`;
|
||||
}
|
||||
|
||||
static async load() {
|
||||
|
@ -17,15 +18,27 @@ class Cache {
|
|||
|
||||
// Cache miss
|
||||
if (!libraryFolder) {
|
||||
console.log(`Cache was not available for "${this.libraryKey}"`);
|
||||
return;
|
||||
}
|
||||
|
||||
// Restore
|
||||
console.log(`Restoring cache "${libraryFolder}"`);
|
||||
await core.addPath(libraryFolder);
|
||||
console.log(`contents of ${libraryFolder}`);
|
||||
await exec.exec(`ls -alh ${libraryFolder}`);
|
||||
}
|
||||
|
||||
static async save() {
|
||||
await tc.cacheDir(Unity.libraryFolder, 'library', this.libraryKey);
|
||||
const cachedPath = await tc.cacheDir(Unity.libraryFolder, 'library', this.libraryKey);
|
||||
|
||||
console.log(`cached ${cachedPath}`);
|
||||
|
||||
console.log(`Contents of ${Unity.libraryFolder}:`);
|
||||
await exec.exec(`ls -alh ${Unity.libraryFolder}`);
|
||||
|
||||
console.log(`contents of ${cachedPath}`);
|
||||
await exec.exec(`ls -alh ${cachedPath}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue