-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make use of new productversion field if available #7045
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Enhancement: Log correct oCIS version if available | ||
|
||
oCIS has introduced a new `productversion` field to announce it's correct version while maintaining a fake 10.x.x version in the `versionstring` field to keep clients compatible. We're using the new productversion field when it exists and use versionstring as a fallback. Thus the backend product information prints the correct oCIS version now. | ||
|
||
https://github.com/owncloud/ocis/pull/3805 | ||
https://github.com/owncloud/web/pull/7045 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,12 @@ export const getWebVersion = (): string => { | |
} | ||
|
||
export const getBackendVersion = ({ store }: { store: Store<unknown> }): string => { | ||
const backendVersion = store.getters.user.version | ||
if (!backendVersion || !backendVersion.string) { | ||
const backendStatus = store.getters.capabilities?.core?.status | ||
if (!backendStatus || !backendStatus.versionstring) { | ||
return undefined | ||
} | ||
const product = backendVersion.product || 'ownCloud' | ||
const version = backendVersion.string | ||
const edition = backendVersion.edition | ||
const product = backendStatus.product || 'ownCloud' | ||
const version = backendStatus.productversion || backendStatus.versionstring | ||
const edition = backendStatus.edition | ||
return `${product} ${version} ${edition}` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just had a random shower thought on whether we should insert There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To detect whether the bundle-watched dist is being used or the shipped There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oha, nice! good idea :-) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will do that in a followup to unblock the next ocis beta |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, where did user.version come from in the past?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the capabilities response is extracted into the
user
store module ascapabilities
andversion
keys. seeweb/packages/web-runtime/src/store/user.js
Line 261 in 31ba516