Skip to content
This repository was archived by the owner on Jul 28, 2024. It is now read-only.

Added VP_WP_CLI_BINARY option to vp config#1187

Merged
JanVoracek merged 3 commits intoversionpress:masterfrom
LorincJuraj:1186-wp-cli-path-config
Jun 27, 2017
Merged

Added VP_WP_CLI_BINARY option to vp config#1187
JanVoracek merged 3 commits intoversionpress:masterfrom
LorincJuraj:1186-wp-cli-path-config

Conversation

@LorincJuraj
Copy link
Copy Markdown
Contributor

@LorincJuraj LorincJuraj commented Jan 24, 2017

Resolves #1186

Creates new config constant which gives an option to set custom path to WP-CLI.
Works same way as VP_GIT_BINARY:

wp vp config VP_WP_CLI_BINARY '/custom/path/to/wp'


Followup PR with docs: #1340

@LorincJuraj LorincJuraj changed the title [#1186] Added VP_WP_CLI_BINARY option to vp config Added VP_WP_CLI_BINARY option to vp config Jan 24, 2017
@borekb borekb requested review from JanVoracek and borekb January 24, 2017 16:05
@borekb
Copy link
Copy Markdown
Member

borekb commented Jan 24, 2017

Thanks, @LorincJuraj, we'll look at it soon.

Copy link
Copy Markdown
Member

@borekb borekb left a comment

Choose a reason for hiding this comment

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

Looks good to me apart from one small issue, thanks! Let's wait for @JanVoracek's review – he is a bit busy these days but should be able to look at it later this week.

define('VP_GIT_BINARY', 'git');
}

if (!defined('VP_GIT_BINARY')) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Duplicates the block above, probably an oversight.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@borekb you are right. It was an oversight. Fixed now c9c7779 . Thanks.

* VP_VPDB_DIR: Absolute path to directory where VersionPress saves
* versioned database data.
* VP_GIT_BINARY: Absolute path to the git binary.
* VP_WP_CLI_BINARY: Absolute path to the WP-CLI binary.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The new implementation maybe even allows defining VP_WP_CLI_BINARY as 'php wp-cli.phar'; I can imagine that could be useful sometimes. Is that correct?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It does not allow php wp-cli.phar as it can be only an absolute path. wp vp config checks whether the file exists.

@borekb borekb added this to the 4.0 milestone May 8, 2017
@JanVoracek JanVoracek merged commit 7463687 into versionpress:master Jun 27, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants