Added script to push premium resources to sandbox (#5196)
This commit is contained in:
parent
48b3271382
commit
7e0d5a4297
2 changed files with 22 additions and 0 deletions
|
@ -21,6 +21,7 @@
|
|||
"deploy:version-bump": "node ./theme-utils.mjs version-bump-themes",
|
||||
"deploy:push:all": "node ./theme-utils.mjs push-to-sandbox",
|
||||
"deploy:push:changes": "node ./theme-utils.mjs push-changes-to-sandbox",
|
||||
"deploy:push:premium": "node ./theme-utils.mjs push-premium-to-sandbox",
|
||||
"deploy:git": "node ./theme-utils.mjs push-button-deploy-git",
|
||||
"deploy:svn": "node ./theme-utils.mjs push-button-deploy-svn",
|
||||
"deploy:preview": "node ./theme-utils.mjs deploy-preview",
|
||||
|
|
|
@ -21,6 +21,7 @@ const directoriesToIgnore = [ 'variations', 'videomaker', 'videomaker-white' ];
|
|||
case "clean-all-sandbox-svn": return cleanAllSandboxSvn();
|
||||
case "push-to-sandbox": return pushToSandbox();
|
||||
case "push-changes-to-sandbox": return pushChangesToSandbox();
|
||||
case "push-premium-to-sandbox": return pushPremiumToSandbox();
|
||||
case "version-bump-themes": return versionBumpThemes();
|
||||
case "land-diff-git": return landChangesGit(args?.[1]);
|
||||
case "land-diff-svn": return landChangesSvn(args?.[1]);
|
||||
|
@ -557,6 +558,26 @@ function pushToSandbox() {
|
|||
`);
|
||||
}
|
||||
|
||||
/*
|
||||
Push exactly what is here (all files) up to the sandbox (with the exclusion of files noted in .sandbox-ignore)
|
||||
This pushes only the folders noted as "premiumThemes" into the premium themes directory.
|
||||
|
||||
This is the only part of the deploy process that is automated; the rest must be done manually including:
|
||||
* Creating a Phabricator Diff
|
||||
* Landing (comitting) the change
|
||||
* Deploying the theme
|
||||
* Triggering the .zip builds
|
||||
*/
|
||||
function pushPremiumToSandbox() {
|
||||
const premiumThemes = [
|
||||
'videomaker',
|
||||
'videomaker-white'
|
||||
]
|
||||
executeCommand(`
|
||||
rsync -av --no-p --no-times --exclude-from='.sandbox-ignore' ./${premiumThemes.join(' ./')} wpcom-sandbox:${sandboxRootFolder}/wp-content/themes/premium/
|
||||
`, true);
|
||||
}
|
||||
|
||||
/*
|
||||
Push only (and every) change since the point-of-diversion from /trunk
|
||||
Remove files from the sandbox that have been removed since the last deployed hash
|
||||
|
|
Loading…
Add table
Reference in a new issue