Skip to content

Commit 9a66b7e

Browse files
committed
Compile dist/
1 parent 0cbf109 commit 9a66b7e

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

dist/main/index.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,14 @@ const path = __nccwpck_require__(6928)
168168
const core = __nccwpck_require__(7484)
169169

170170
function init(cacheConfig) {
171-
if (!cacheConfig.enabled) {
172-
return
173-
}
174-
175171
core.startGroup(`Computing initial ${cacheConfig.name} cache hash`)
176172
fs.writeFileSync(cacheConfig.path + '.sha256', computeCacheHash(cacheConfig.path))
177173
core.endGroup()
178174
}
179175

180176
function run(cacheConfig) {
181177
if (!fs.existsSync(cacheConfig.path)) {
178+
core.warning(`No ${cacheConfig.name} cache present`)
182179
return
183180
}
184181

@@ -103394,10 +103391,6 @@ async function restoreExternalCaches(cacheConfig) {
103394103391
}
103395103392

103396103393
async function restoreCacheImpl(cacheConfig, primaryKey, restoreKeys, cacheHit) {
103397-
if (!cacheConfig.enabled) {
103398-
return
103399-
}
103400-
103401103394
const delay = Math.random() * 1000 // timeout <= 1 sec to reduce 429 errors
103402103395
await index_setTimeout(delay, async function () {
103403103396
core.startGroup(`Restore cache for ${cacheConfig.name}`)
@@ -103427,6 +103420,10 @@ async function restoreCacheImpl(cacheConfig, primaryKey, restoreKeys, cacheHit)
103427103420
}
103428103421

103429103422
async function restoreCache(cacheConfig) {
103423+
if (!cacheConfig.enabled) {
103424+
return
103425+
}
103426+
103430103427
const hash = await glob.hashFiles(cacheConfig.files.join('\n'))
103431103428
const restoreKey = `${config.baseCacheKey}-${cacheConfig.name}-`
103432103429
const key = `${restoreKey}${hash}`
@@ -103437,6 +103434,10 @@ async function restoreCache(cacheConfig) {
103437103434
}
103438103435

103439103436
async function restoreGcCache(cacheConfig) {
103437+
if (!cacheConfig.enabled) {
103438+
return
103439+
}
103440+
103440103441
// Since disk caches get updated on any change, each run has a unique key.
103441103442
// Therefore it can only be restored by prefix match, rather than exact key match.
103442103443
// When multiple prefix matches exist, the most recent is selected.

dist/main/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,14 @@ const path = __nccwpck_require__(6928)
168168
const core = __nccwpck_require__(7484)
169169

170170
function init(cacheConfig) {
171-
if (!cacheConfig.enabled) {
172-
return
173-
}
174-
175171
core.startGroup(`Computing initial ${cacheConfig.name} cache hash`)
176172
fs.writeFileSync(cacheConfig.path + '.sha256', computeCacheHash(cacheConfig.path))
177173
core.endGroup()
178174
}
179175

180176
function run(cacheConfig) {
181177
if (!fs.existsSync(cacheConfig.path)) {
178+
core.warning(`No ${cacheConfig.name} cache present`)
182179
return
183180
}
184181

@@ -102467,17 +102464,18 @@ async function saveGcCache(cacheConfig) {
102467102464

102468102465
const hash = gc.run(cacheConfig)
102469102466

102467+
core.startGroup(`Save cache for ${cacheConfig.name}`)
102468+
102470102469
// cache is unchanged
102471102470
if (!hash) {
102471+
core.info(`No changes to ${cacheConfig} cache detected, skipping upload`)
102472102472
return
102473102473
}
102474102474

102475102475
const key = `${config.baseCacheKey}-${cacheConfig.name}-${hash}`
102476102476
const paths = cacheConfig.paths
102477102477

102478102478
try {
102479-
core.startGroup(`Save cache for ${cacheConfig.name}`)
102480-
102481102479
// cache already exists
102482102480
if (await cache.restoreCache(paths, key, [], { lookupOnly: true })) {
102483102481
core.info('Cache already exists, skipping upload')
@@ -102489,9 +102487,9 @@ async function saveGcCache(cacheConfig) {
102489102487
core.info('Successfully saved cache')
102490102488
} catch (error) {
102491102489
core.warning(error.stack)
102492-
} finally {
102493-
core.endGroup()
102494102490
}
102491+
102492+
core.endGroup()
102495102493
}
102496102494

102497102495
async function saveCache(cacheConfig) {

dist/post/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)