mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-25 14:26:19 +08:00
Build outputs
This commit is contained in:
parent
93c31ca3b5
commit
33ed11e54c
39
dist/main/index.js
vendored
39
dist/main/index.js
vendored
@ -64909,10 +64909,17 @@ class GradleStateCache {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const cacheKey = (0, cache_utils_1.generateCacheKey)(this.cacheName).key;
|
const cacheKey = (0, cache_utils_1.generateCacheKey)(this.cacheName).key;
|
||||||
const restoredCacheKey = core.getState(RESTORED_CACHE_KEY_KEY);
|
const restoredCacheKey = core.getState(RESTORED_CACHE_KEY_KEY);
|
||||||
const entryListener = listener.entry(this.cacheDescription);
|
const gradleHomeEntryListener = listener.entry(this.cacheDescription);
|
||||||
if (restoredCacheKey && cacheKey === restoredCacheKey) {
|
if (restoredCacheKey && cacheKey === restoredCacheKey) {
|
||||||
core.info(`Cache hit occurred on the cache key ${cacheKey}, not saving cache.`);
|
core.info(`Cache hit occurred on the cache key ${cacheKey}, not saving cache.`);
|
||||||
entryListener.markUnchanged('cache key not changed');
|
for (const entryListener of listener.cacheEntries) {
|
||||||
|
if (entryListener === gradleHomeEntryListener) {
|
||||||
|
entryListener.markUnsaved('cache key not changed');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
entryListener.markUnsaved(`referencing '${this.cacheDescription}' cache entry not saved`);
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -64924,7 +64931,7 @@ class GradleStateCache {
|
|||||||
}
|
}
|
||||||
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`);
|
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`);
|
||||||
const cachePath = this.getCachePath();
|
const cachePath = this.getCachePath();
|
||||||
yield (0, cache_utils_1.saveCache)(cachePath, cacheKey, entryListener);
|
yield (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -65154,7 +65161,7 @@ class AbstractEntryExtractor {
|
|||||||
const previouslyRestoredKey = (_a = previouslyRestoredEntries.find(x => x.artifactType === artifactType && x.pattern === pattern)) === null || _a === void 0 ? void 0 : _a.cacheKey;
|
const previouslyRestoredKey = (_a = previouslyRestoredEntries.find(x => x.artifactType === artifactType && x.pattern === pattern)) === null || _a === void 0 ? void 0 : _a.cacheKey;
|
||||||
if (previouslyRestoredKey === cacheKey) {
|
if (previouslyRestoredKey === cacheKey) {
|
||||||
(0, cache_utils_1.cacheDebug)(`No change to previously restored ${artifactType}. Not saving.`);
|
(0, cache_utils_1.cacheDebug)(`No change to previously restored ${artifactType}. Not saving.`);
|
||||||
entryListener.markUnchanged('contents unchanged');
|
entryListener.markUnsaved('contents unchanged');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`);
|
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`);
|
||||||
@ -65232,9 +65239,9 @@ class GradleHomeEntryExtractor extends AbstractEntryExtractor {
|
|||||||
implicitDescendants: false,
|
implicitDescendants: false,
|
||||||
followSymbolicLinks: false
|
followSymbolicLinks: false
|
||||||
});
|
});
|
||||||
for (const p of yield globber.glob()) {
|
for (const wrapperZip of yield globber.glob()) {
|
||||||
(0, cache_utils_1.cacheDebug)(`Deleting wrapper zip: ${p}`);
|
(0, cache_utils_1.cacheDebug)(`Deleting wrapper zip: ${wrapperZip}`);
|
||||||
(0, cache_utils_1.tryDelete)(p);
|
yield (0, cache_utils_1.tryDelete)(wrapperZip);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -65399,8 +65406,8 @@ class CacheEntryListener {
|
|||||||
this.savedSize = 0;
|
this.savedSize = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markUnchanged(message) {
|
markUnsaved(message) {
|
||||||
this.unchanged = message;
|
this.unsaved = message;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -65452,8 +65459,8 @@ function getRestoredMessage(entry, isCacheWriteOnly) {
|
|||||||
return '(Entry restored: partial match found)';
|
return '(Entry restored: partial match found)';
|
||||||
}
|
}
|
||||||
function getSavedMessage(entry, isCacheReadOnly) {
|
function getSavedMessage(entry, isCacheReadOnly) {
|
||||||
if (entry.unchanged) {
|
if (entry.unsaved) {
|
||||||
return `(Entry not saved: ${entry.unchanged})`;
|
return `(Entry not saved: ${entry.unsaved})`;
|
||||||
}
|
}
|
||||||
if (entry.savedKey === undefined) {
|
if (entry.savedKey === undefined) {
|
||||||
if (isCacheReadOnly) {
|
if (isCacheReadOnly) {
|
||||||
@ -65474,12 +65481,9 @@ function getSize(cacheEntries, predicate) {
|
|||||||
return Math.round(bytes / (1024 * 1024));
|
return Math.round(bytes / (1024 * 1024));
|
||||||
}
|
}
|
||||||
function formatSize(bytes) {
|
function formatSize(bytes) {
|
||||||
if (bytes === undefined) {
|
if (bytes === undefined || bytes === 0) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
if (bytes === 0) {
|
|
||||||
return '0 (Entry already exists)';
|
|
||||||
}
|
|
||||||
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65672,9 +65676,12 @@ exports.handleCacheFailure = handleCacheFailure;
|
|||||||
function tryDelete(file) {
|
function tryDelete(file) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const maxAttempts = 5;
|
const maxAttempts = 5;
|
||||||
const stat = fs.lstatSync(file);
|
|
||||||
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
||||||
|
if (!fs.existsSync(file)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
|
const stat = fs.lstatSync(file);
|
||||||
if (stat.isDirectory()) {
|
if (stat.isDirectory()) {
|
||||||
fs.rmdirSync(file, { recursive: true });
|
fs.rmdirSync(file, { recursive: true });
|
||||||
}
|
}
|
||||||
|
2
dist/main/index.js.map
vendored
2
dist/main/index.js.map
vendored
File diff suppressed because one or more lines are too long
39
dist/post/index.js
vendored
39
dist/post/index.js
vendored
@ -63960,10 +63960,17 @@ class GradleStateCache {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const cacheKey = (0, cache_utils_1.generateCacheKey)(this.cacheName).key;
|
const cacheKey = (0, cache_utils_1.generateCacheKey)(this.cacheName).key;
|
||||||
const restoredCacheKey = core.getState(RESTORED_CACHE_KEY_KEY);
|
const restoredCacheKey = core.getState(RESTORED_CACHE_KEY_KEY);
|
||||||
const entryListener = listener.entry(this.cacheDescription);
|
const gradleHomeEntryListener = listener.entry(this.cacheDescription);
|
||||||
if (restoredCacheKey && cacheKey === restoredCacheKey) {
|
if (restoredCacheKey && cacheKey === restoredCacheKey) {
|
||||||
core.info(`Cache hit occurred on the cache key ${cacheKey}, not saving cache.`);
|
core.info(`Cache hit occurred on the cache key ${cacheKey}, not saving cache.`);
|
||||||
entryListener.markUnchanged('cache key not changed');
|
for (const entryListener of listener.cacheEntries) {
|
||||||
|
if (entryListener === gradleHomeEntryListener) {
|
||||||
|
entryListener.markUnsaved('cache key not changed');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
entryListener.markUnsaved(`referencing '${this.cacheDescription}' cache entry not saved`);
|
||||||
|
}
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
@ -63975,7 +63982,7 @@ class GradleStateCache {
|
|||||||
}
|
}
|
||||||
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`);
|
core.info(`Caching ${this.cacheDescription} with cache key: ${cacheKey}`);
|
||||||
const cachePath = this.getCachePath();
|
const cachePath = this.getCachePath();
|
||||||
yield (0, cache_utils_1.saveCache)(cachePath, cacheKey, entryListener);
|
yield (0, cache_utils_1.saveCache)(cachePath, cacheKey, gradleHomeEntryListener);
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -64205,7 +64212,7 @@ class AbstractEntryExtractor {
|
|||||||
const previouslyRestoredKey = (_a = previouslyRestoredEntries.find(x => x.artifactType === artifactType && x.pattern === pattern)) === null || _a === void 0 ? void 0 : _a.cacheKey;
|
const previouslyRestoredKey = (_a = previouslyRestoredEntries.find(x => x.artifactType === artifactType && x.pattern === pattern)) === null || _a === void 0 ? void 0 : _a.cacheKey;
|
||||||
if (previouslyRestoredKey === cacheKey) {
|
if (previouslyRestoredKey === cacheKey) {
|
||||||
(0, cache_utils_1.cacheDebug)(`No change to previously restored ${artifactType}. Not saving.`);
|
(0, cache_utils_1.cacheDebug)(`No change to previously restored ${artifactType}. Not saving.`);
|
||||||
entryListener.markUnchanged('contents unchanged');
|
entryListener.markUnsaved('contents unchanged');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`);
|
core.info(`Caching ${artifactType} with path '${pattern}' and cache key: ${cacheKey}`);
|
||||||
@ -64283,9 +64290,9 @@ class GradleHomeEntryExtractor extends AbstractEntryExtractor {
|
|||||||
implicitDescendants: false,
|
implicitDescendants: false,
|
||||||
followSymbolicLinks: false
|
followSymbolicLinks: false
|
||||||
});
|
});
|
||||||
for (const p of yield globber.glob()) {
|
for (const wrapperZip of yield globber.glob()) {
|
||||||
(0, cache_utils_1.cacheDebug)(`Deleting wrapper zip: ${p}`);
|
(0, cache_utils_1.cacheDebug)(`Deleting wrapper zip: ${wrapperZip}`);
|
||||||
(0, cache_utils_1.tryDelete)(p);
|
yield (0, cache_utils_1.tryDelete)(wrapperZip);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -64450,8 +64457,8 @@ class CacheEntryListener {
|
|||||||
this.savedSize = 0;
|
this.savedSize = 0;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
markUnchanged(message) {
|
markUnsaved(message) {
|
||||||
this.unchanged = message;
|
this.unsaved = message;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -64503,8 +64510,8 @@ function getRestoredMessage(entry, isCacheWriteOnly) {
|
|||||||
return '(Entry restored: partial match found)';
|
return '(Entry restored: partial match found)';
|
||||||
}
|
}
|
||||||
function getSavedMessage(entry, isCacheReadOnly) {
|
function getSavedMessage(entry, isCacheReadOnly) {
|
||||||
if (entry.unchanged) {
|
if (entry.unsaved) {
|
||||||
return `(Entry not saved: ${entry.unchanged})`;
|
return `(Entry not saved: ${entry.unsaved})`;
|
||||||
}
|
}
|
||||||
if (entry.savedKey === undefined) {
|
if (entry.savedKey === undefined) {
|
||||||
if (isCacheReadOnly) {
|
if (isCacheReadOnly) {
|
||||||
@ -64525,12 +64532,9 @@ function getSize(cacheEntries, predicate) {
|
|||||||
return Math.round(bytes / (1024 * 1024));
|
return Math.round(bytes / (1024 * 1024));
|
||||||
}
|
}
|
||||||
function formatSize(bytes) {
|
function formatSize(bytes) {
|
||||||
if (bytes === undefined) {
|
if (bytes === undefined || bytes === 0) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
if (bytes === 0) {
|
|
||||||
return '0 (Entry already exists)';
|
|
||||||
}
|
|
||||||
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
return `${Math.round(bytes / (1024 * 1024))} MB (${bytes} B)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64723,9 +64727,12 @@ exports.handleCacheFailure = handleCacheFailure;
|
|||||||
function tryDelete(file) {
|
function tryDelete(file) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const maxAttempts = 5;
|
const maxAttempts = 5;
|
||||||
const stat = fs.lstatSync(file);
|
|
||||||
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
||||||
|
if (!fs.existsSync(file)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
|
const stat = fs.lstatSync(file);
|
||||||
if (stat.isDirectory()) {
|
if (stat.isDirectory()) {
|
||||||
fs.rmdirSync(file, { recursive: true });
|
fs.rmdirSync(file, { recursive: true });
|
||||||
}
|
}
|
||||||
|
2
dist/post/index.js.map
vendored
2
dist/post/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user