Change studio.json to meta.json - #623
Conversation
sejas
left a comment
There was a problem hiding this comment.
I tested it exporting and I confirm the zip contains a meta.json file and not studio.json. Importing also worked as expected, it used the meta data to use the changed php version. It seems we don't support custom WordPress versions or at least in my example didn't use the version 6.5.5 I set in meta.json.
Export:
Import test:
| } else if ( file.startsWith( 'wp-content/themes/' ) ) { | ||
| extractedBackup.wpContent.themes.push( fullPath ); | ||
| } else if ( file === 'studio.json' ) { | ||
| } else if ( file === 'studio.json' || file === 'meta.json' ) { |
There was a problem hiding this comment.
Smart move by not removing the old studio.json 👍
Correct, it's not supported yet. |
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
|
Thanks! |
| export interface StudioJson { | ||
| phpVersion: string; | ||
| wordpressVersion?: string; | ||
| siteUrl: string; | ||
| plugins: StudioJsonPluginOrTheme[]; | ||
| themes: StudioJsonPluginOrTheme[]; | ||
| } | ||
|
|
||
| export interface StudioJsonPluginOrTheme { | ||
| name: string; | ||
| status: 'active' | 'inactive'; | ||
| version: string; | ||
| } |
There was a problem hiding this comment.
@myhro - we can reuse that typing for https://github.com/Automattic/jetpack-backup-team/issues/694 / https://github.com/Automattic/jetpack-backup-team/issues/693
There was a problem hiding this comment.
Makes sense to me. Thanks for pointing it out!
I've added https://github.com/Automattic/dotcom-forge/issues/9582 |
Resolves https://github.com/Automattic/dotcom-forge/issues/9351
Proposed Changes
I propose to change the default meta file name to
meta.jsonand format to the following one:The data there will allow other systems like VaultPress to import the site easily.
Testing Instructions
Export
meta.jsonfile exists and has the correct contentImport
meta.jsonfilestudio.jsonfilePre-merge Checklist