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

Use config from wp-cli.yml #4

Open
strarsis opened this issue May 11, 2017 · 6 comments
Open

Use config from wp-cli.yml #4

strarsis opened this issue May 11, 2017 · 6 comments

Comments

@strarsis
Copy link
Contributor

strarsis commented May 11, 2017

The wp cli aliases are already defined in wp-cli.yml - it would reduce the amount of config and
the necessity keeping it in sync when trellis-sync also uses the config in wp-cli.yml.

@jasperf
Copy link
Owner

jasperf commented May 23, 2017

What do you mean? I do not follow.. We do use an example wp-cli.yml (wp-cli.yaml earlier on).

@strarsis
Copy link
Contributor Author

Wouldn't it be better if the configuration would be moved from sync-all.sh to a separate yaml file? Or the domain + uploads/ directory field either determined automatically using wp cli?

@jasperf
Copy link
Owner

jasperf commented May 24, 2017

Well, it would be cleaner to have:

DEVDIR="web/app/uploads/"
DEVSITE="https://example.dev"

PRODDIR="[email protected]:/srv/www/example.com/shared/uploads/"
PRODSITE="https://example.com"

STAGDIR="[email protected]:/srv/www/example.com/shared/uploads/"
STAGSITE="https://staging.example.com"

loaded from the wp-cli.yml file. Perhaps similar to what we have at sync-db-from-prod.sh and sync-db-from-dev.sh. An option would be to turn sync-db-from-prod.sh into synch-em-all.sh and add and if else with to and from production. But then we would need to include rsync -az --progress "$FROMDIR" "$TODIR" still. We could keep rsynch, but if we want to replace the shell variables for the directories I am not sure how we could do that using wp-cli.yml or a separate yml file.

@strarsis
Copy link
Contributor Author

@jasperf: Ideally the script can be installed globally and be used with
different WordPress sites, using the wp-cli.yml file with the extra options.

@jasperf
Copy link
Owner

jasperf commented Jun 13, 2017

Well, that is something that sounds like a conversion of this package to a composer package you could install globally. Never did that before. Made a basic composer.json just now. Feel free to check it and or send in PRs for improvement.

@strarsis
Copy link
Contributor Author

@jasperf: It would be great if the commits in this repository are semver-tagged,
then I can also specify a version for this tool in composer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants