Skip to content
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

Updates to descriptions and examples for vip backup #1766

Merged
merged 4 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/bin/vip-backup-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ import { makeCommandTracker } from '../lib/tracker';

const examples = [
{
usage: 'vip backup db @mysite.develop',
description: 'Trigger a new backup for your database of the @mysite.develop environment',
usage:
'vip @example-app.develop backup db\n' +
' Generating a new database backup...\n' +
' ✓ Preparing for backup generation\n' +
' ✓ Generating backup\n' +
' New database backup created',
description: 'Generate a new database backup of an environment.',
},
];

Expand Down
10 changes: 7 additions & 3 deletions src/bin/vip-backup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import command from '../lib/cli/command';
import { trackEvent } from '../lib/tracker';

void command( { usage: 'vip backup' } )
.command( 'db', 'Trigger a new backup for your database' )
.command( 'db', 'Generate a new database backup of an environment.' )
.example(
'vip backup db @mysite.develop',
'Trigger a new backup for your database of the @mysite.develop environment'
'vip @example-app.develop backup db\n' +
' Generating a new database backup...\n' +
' ✓ Preparing for backup generation\n' +
' ✓ Generating backup\n' +
' New database backup created',
'Generate a new database backup of an environment.'
)
.argv( process.argv, async () => {
await trackEvent( 'vip_backup_command_execute' );
Expand Down
2 changes: 1 addition & 1 deletion src/bin/vip.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const runCmd = async function () {
cmd
.command( 'logout', 'Logout from your current session' )
.command( 'app', 'List and modify your VIP applications' )
.command( 'backup', 'Generate a backup for VIP applications' )
.command( 'backup', 'Generate a backup of an environment.' )
yolih marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this match the text above?

Generate a new database backup of an environment.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sooo... this touches on our grander strategic discussion around the patterns that our VIP-CLI command library should follow in order to be truly extensible.
By adding the command vip backup, we should be doing so because we believe that we will be adding a group of subcommands related to backup (e.g., db, media).
In good faith that this might be the direction that we are heading in for vip backup, we are choosing to describe that command in a more neutral manner.

.command( 'cache', 'Manage page cache for your VIP applications' )
.command( 'config', 'Manage environment configurations.' )
.command( 'dev-env', 'Use local dev-environment' )
Expand Down