ci: fixed publish.js script

im retarded
This commit is contained in:
alina 🌸 2023-12-29 16:55:34 +03:00
parent c2e5e0924d
commit 710c040f60
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI

View file

@ -90,7 +90,7 @@ async function main(arg = process.argv[2]) {
console.log('[i] Using registry %s', REGISTRY) console.log('[i] Using registry %s', REGISTRY)
const published = [] const publishedPkgs = []
if (arg === 'all' || arg === 'updated') { if (arg === 'all' || arg === 'updated') {
for (const pkg of listPackages()) { for (const pkg of listPackages()) {
@ -103,12 +103,12 @@ async function main(arg = process.argv[2]) {
} }
await publishSinglePackage(pkg) await publishSinglePackage(pkg)
published.push(pkg) publishedPkgs.push(pkg)
} }
} else { } else {
for (const pkg of arg.split(',')) { for (const pkg of arg.split(',')) {
await publishSinglePackage(pkg) await publishSinglePackage(pkg)
published.push(pkg) publishedPkgs.push(pkg)
} }
} }
@ -117,7 +117,7 @@ async function main(arg = process.argv[2]) {
// for a github release, and also generate a title // for a github release, and also generate a title
const tarballs = [] const tarballs = []
for (const pkg of published) { for (const pkg of publishedPkgs) {
const dir = path.join(__dirname, '../packages', pkg, 'dist') const dir = path.join(__dirname, '../packages', pkg, 'dist')
const tar = cp.execSync('npm pack -q', { cwd: dir }) const tar = cp.execSync('npm pack -q', { cwd: dir })
tarballs.push(path.join(dir, tar.toString().trim())) tarballs.push(path.join(dir, tar.toString().trim()))