Skip to content

Commit 5db67bc

Browse files
committed
wip
1 parent 9ffb0cb commit 5db67bc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

scripts/purge-jsdeliver-cache.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ const purgeJsDelivrCache = async (packageName, relativePath) => {
1515

1616
// Check if the current git HEAD has a tag containing the package name
1717
try {
18-
const tags = execSync('git tag --contains HEAD', { cwd: gitRoot })
19-
.toString()
20-
.split('\n')
21-
.filter((tag) => tag.includes(packageName))
18+
const tags = execSync('git tag --contains HEAD', {
19+
cwd: gitRoot,
20+
}).toString()
2221

23-
if (tags.length === 0) {
22+
const hasTags = tags.includes(packageName)
23+
if (!hasTags) {
2424
console.log(
2525
`No tags containing the package name "${packageName}" found on the current git HEAD. Aborting script.`
2626
)

0 commit comments

Comments
 (0)