fix(auto-update): support prerelease versions without numeric suffix in fallback
This commit is contained in:
parent
88148fe248
commit
f260d15632
@ -4,7 +4,7 @@ const PACKAGE_NAME = "oh-my-opencode"
|
|||||||
const PRIORITIZED_TAGS = ["latest", "beta", "next"] as const
|
const PRIORITIZED_TAGS = ["latest", "beta", "next"] as const
|
||||||
|
|
||||||
function getFallbackEntry(version: string): string {
|
function getFallbackEntry(version: string): string {
|
||||||
const prereleaseMatch = version.match(/-([a-zA-Z][a-zA-Z0-9]*)\./)
|
const prereleaseMatch = version.match(/-([a-zA-Z][a-zA-Z0-9-]*)(?:\.|$)/)
|
||||||
if (prereleaseMatch) {
|
if (prereleaseMatch) {
|
||||||
return `${PACKAGE_NAME}@${prereleaseMatch[1]}`
|
return `${PACKAGE_NAME}@${prereleaseMatch[1]}`
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user