Skip to content

Commit 2e2fe83

Browse files
committed
wip
1 parent f05ac32 commit 2e2fe83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/purge-jsdeliver-cache.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const fs = require('node:fs')
33
const path = require('node:path')
44
/**
55
* Given a package name and a relative path to the dist folder -- it reads all the files and runs them through the jsdelivr cache purge API.
6+
* Will abort the API unless the current commit has a tag with the package name on it.
67
*/
78
const purgeJsDelivrCache = async (packageName, relativePath) => {
89
const gitRoot = path.resolve(__dirname, '..')
@@ -22,7 +23,7 @@ const purgeJsDelivrCache = async (packageName, relativePath) => {
2223
const hasMatchingTag = tags.includes(packageName)
2324
if (!hasMatchingTag) {
2425
console.log(
25-
`No tags containing the package name "${packageName}" found on the current git HEAD. Aborting script.`
26+
`No tags containing the package name "${packageName}" found on the current git HEAD. Aborting cache purge.`
2627
)
2728
process.exit(0)
2829
}

0 commit comments

Comments
 (0)