build: 🐛 fix package name parsing allow any string as name and scope

This commit is contained in:
Julien Oculi 2024-06-15 16:18:21 +02:00
parent 41ba7e2904
commit 0c8789435c

View file

@ -1,11 +1,11 @@
import { join } from '$std/path/join.ts'
import { ensureDir } from '$std/fs/mod.ts'
import { join } from '$std/path/join.ts'
import denoJson from '../deno.json' with { type: 'json' }
// Get package from cli
const baseRepo = 'https://git.cohabit.fr/'
const packageRepoAndTag = Deno.args[0]
const match = packageRepoAndTag.match(/(?<name>@\w+\/\w+)@(?<tag>\d\.\d\.\d.*)/)
const match = packageRepoAndTag.match(/(?<name>@\S+\/\S+)@(?<tag>\d\.\d\.\d.*)/)
// Parse name and version tag
if (match === null || match.groups === undefined) {