Diagnostic tool: correctly parse Prosody nightly build versions.
This commit is contained in:
parent
6608480826
commit
67f330017d
@ -7,6 +7,7 @@
|
||||
* Builtin Prosody: optional settings to change the url for Prosody's API calls.
|
||||
* Diagnostic tool: testing API communication from Peertube to Prosody.
|
||||
* Diagnostic tool: testing API communication from Prosody to Peertube.
|
||||
* Diagnostic tool: correctly parse Prosody nightly build versions.
|
||||
|
||||
## v3.0.0
|
||||
|
||||
|
@ -74,7 +74,7 @@ export async function diagProsody (test: string, options: RegisterServerOptions)
|
||||
return result
|
||||
}
|
||||
|
||||
const versionMatches = about.match(/^Prosody\s*(\d+)\.(\d+)\.(\d+)\s*$/mi)
|
||||
const versionMatches = about.match(/^Prosody\s*(\d+)\.(\d+)(?:\.(\d+)| (nightly build \d+.*))\s*$/mi)
|
||||
if (!versionMatches) {
|
||||
result.messages.push({
|
||||
level: 'error',
|
||||
@ -84,7 +84,7 @@ export async function diagProsody (test: string, options: RegisterServerOptions)
|
||||
} else {
|
||||
const major = versionMatches[1]
|
||||
const minor = versionMatches[2]
|
||||
const patch = versionMatches[3]
|
||||
const patch = versionMatches[3] ?? versionMatches[4]
|
||||
result.messages.push(`Prosody version is ${major}.${minor}.${patch}`)
|
||||
if (major !== '0' && minor !== '11') {
|
||||
result.messages.push({
|
||||
|
Loading…
x
Reference in New Issue
Block a user