fix: allow multiple digits versions (#233)

This commit is contained in:
Adam Uhlíř 2022-12-14 04:38:57 -08:00 committed by GitHub
parent 276f04265d
commit 4058525ab6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,7 @@ export class Start extends RootCommand implements LeafCommand {
this.beeVersion = stripCommit(this.beeVersion)
const supportedBeeVersion = PackageJson.engines.supportedBee
if (!semver.satisfies(this.beeVersion, supportedBeeVersion)) {
if (!semver.satisfies(this.beeVersion, supportedBeeVersion, { includePrerelease: true })) {
throw new Error(
`Unsupported Bee version!\nThis version of Bee Factory supports versions: ${supportedBeeVersion}, but you have requested start of ${this.beeVersion}`,
)

View File

@ -3,7 +3,7 @@ import * as path from 'path'
import { promisify } from 'util'
const readFile = promisify(readFileCb)
const VERSION_REGEX = /^\d\.\d\.\d(-\w+)*$/
const VERSION_REGEX = /^\d+\.\d+\.\d+(-\w+)*$/
export function stripCommit(version: string): string {
if (version === 'latest') {