Skip to content

Commit a1980df

Browse files
committed
Compile dist/
1 parent 86c14b1 commit a1980df

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

dist/main/index.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,17 @@ const core = __nccwpck_require__(7484)
169169

170170
function init(cacheConfig) {
171171
core.startGroup(`Computing initial ${cacheConfig.name} cache hash`)
172-
fs.writeFileSync(cacheConfig.path + '.sha256', computeCacheHash(cacheConfig.path))
172+
fs.writeFileSync(cacheConfig.paths[0] + '.sha256', computeCacheHash(cacheConfig.paths[0]))
173173
core.endGroup()
174174
}
175175

176176
function run(cacheConfig) {
177-
if (!fs.existsSync(cacheConfig.path)) {
177+
if (!fs.existsSync(cacheConfig.paths[0])) {
178178
core.warning(`No ${cacheConfig.name} cache present`)
179179
return
180180
}
181181

182-
const files = fs.readdirSync(cacheConfig.path, { withFileTypes: true, recursive: true })
182+
const files = fs.readdirSync(cacheConfig.paths[0], { withFileTypes: true, recursive: true })
183183
.filter(d => d.isFile())
184184
.map(d => {
185185
const file = path.join(d.path, d.name)
@@ -208,18 +208,18 @@ function run(cacheConfig) {
208208

209209
function cacheChanged(cacheConfig) {
210210
core.startGroup(`Checking ${cacheConfig.name} cache for changes`)
211-
const hash = computeCacheHash(cacheConfig.path)
212-
const changed = fs.readFileSync(cacheConfig.path + '.sha256') != hash
211+
const hash = computeCacheHash(cacheConfig.paths[0])
212+
const changed = fs.readFileSync(cacheConfig.paths[0] + '.sha256') != hash
213213
core.info(`Cache has changes: ${changed}`)
214214
core.endGroup()
215215
return changed ? hash : undefined
216216
}
217217

218-
function computeCacheHash(path) {
218+
function computeCacheHash(cachePath) {
219219
let hash = crypto.createHash('sha256')
220220

221-
if (fs.existsSync(path)) {
222-
const files = fs.readdirSync(path, { withFileTypes: true, recursive: true })
221+
if (fs.existsSync(cachePath)) {
222+
const files = fs.readdirSync(cachePath, { withFileTypes: true, recursive: true })
223223
.filter(d => d.isFile())
224224
.map(d => d.path)
225225
.sort()

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: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,17 @@ const core = __nccwpck_require__(7484)
169169

170170
function init(cacheConfig) {
171171
core.startGroup(`Computing initial ${cacheConfig.name} cache hash`)
172-
fs.writeFileSync(cacheConfig.path + '.sha256', computeCacheHash(cacheConfig.path))
172+
fs.writeFileSync(cacheConfig.paths[0] + '.sha256', computeCacheHash(cacheConfig.paths[0]))
173173
core.endGroup()
174174
}
175175

176176
function run(cacheConfig) {
177-
if (!fs.existsSync(cacheConfig.path)) {
177+
if (!fs.existsSync(cacheConfig.paths[0])) {
178178
core.warning(`No ${cacheConfig.name} cache present`)
179179
return
180180
}
181181

182-
const files = fs.readdirSync(cacheConfig.path, { withFileTypes: true, recursive: true })
182+
const files = fs.readdirSync(cacheConfig.paths[0], { withFileTypes: true, recursive: true })
183183
.filter(d => d.isFile())
184184
.map(d => {
185185
const file = path.join(d.path, d.name)
@@ -208,18 +208,18 @@ function run(cacheConfig) {
208208

209209
function cacheChanged(cacheConfig) {
210210
core.startGroup(`Checking ${cacheConfig.name} cache for changes`)
211-
const hash = computeCacheHash(cacheConfig.path)
212-
const changed = fs.readFileSync(cacheConfig.path + '.sha256') != hash
211+
const hash = computeCacheHash(cacheConfig.paths[0])
212+
const changed = fs.readFileSync(cacheConfig.paths[0] + '.sha256') != hash
213213
core.info(`Cache has changes: ${changed}`)
214214
core.endGroup()
215215
return changed ? hash : undefined
216216
}
217217

218-
function computeCacheHash(path) {
218+
function computeCacheHash(cachePath) {
219219
let hash = crypto.createHash('sha256')
220220

221-
if (fs.existsSync(path)) {
222-
const files = fs.readdirSync(path, { withFileTypes: true, recursive: true })
221+
if (fs.existsSync(cachePath)) {
222+
const files = fs.readdirSync(cachePath, { withFileTypes: true, recursive: true })
223223
.filter(d => d.isFile())
224224
.map(d => d.path)
225225
.sort()
@@ -102468,7 +102468,7 @@ async function saveGcCache(cacheConfig) {
102468102468

102469102469
// cache is unchanged
102470102470
if (!hash) {
102471-
core.info(`No changes to ${cacheConfig} cache detected, skipping upload`)
102471+
core.info(`No changes to ${cacheConfig.name} cache detected, skipping upload`)
102472102472
return
102473102473
}
102474102474

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)