build: 🐛 fix package name parsing allow any string as name and scope
This commit is contained in:
parent
41ba7e2904
commit
0c8789435c
|
@ -1,11 +1,11 @@
|
||||||
import { join } from '$std/path/join.ts'
|
|
||||||
import { ensureDir } from '$std/fs/mod.ts'
|
import { ensureDir } from '$std/fs/mod.ts'
|
||||||
|
import { join } from '$std/path/join.ts'
|
||||||
import denoJson from '../deno.json' with { type: 'json' }
|
import denoJson from '../deno.json' with { type: 'json' }
|
||||||
|
|
||||||
// Get package from cli
|
// Get package from cli
|
||||||
const baseRepo = 'https://git.cohabit.fr/'
|
const baseRepo = 'https://git.cohabit.fr/'
|
||||||
const packageRepoAndTag = Deno.args[0]
|
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
|
// Parse name and version tag
|
||||||
if (match === null || match.groups === undefined) {
|
if (match === null || match.groups === undefined) {
|
||||||
|
|
Loading…
Reference in a new issue