Commit bce462f7 authored by Visay Keo's avatar Visay Keo

[TASK] Use file name instead file content for the master

parent 24883e2a
/config/master/*
\ No newline at end of file
# Introduction ## Introduction
This is a helper tool for fetch content from TYPO3 Flow / Neos installation on a remote server to your local computer running with docker. This is a helper tool for fetch content from TYPO3 Flow / Neos installation on a remote server to your local computer running with docker.
# Dependency ## Dependency
This is requires that your TYPO3 Flow / Neos installation is configured to run with `dockerflow` package. See https://github.com/Sebobo/Shel.DockerFlow This is requires that your TYPO3 Flow / Neos installation is configured to run with `dockerflow` package. See https://github.com/Sebobo/Shel.DockerFlow
# Installation ## Installation
Add the `syncontent` package into your `composer.json` file and update `composer.lock`. It is recommended to add in the `require-dev` section of your composer. Add the `syncontent` package into your `composer.json` file and update `composer.lock`. It is recommended to add in the `require-dev` section of your composer.
...@@ -14,7 +14,7 @@ Add the `syncontent` package into your `composer.json` file and update `composer ...@@ -14,7 +14,7 @@ Add the `syncontent` package into your `composer.json` file and update `composer
"visay/syncontent": "dev-master" "visay/syncontent": "dev-master"
``` ```
# Usage ## Usage
In the root directory of your project, execute: In the root directory of your project, execute:
...@@ -27,12 +27,22 @@ bin/syncontent latest-014-073 ...@@ -27,12 +27,22 @@ bin/syncontent latest-014-073
- Only `latest` or `demo` is supported at the moment. We don't recommend you to have autologin access to the live site - Only `latest` or `demo` is supported at the moment. We don't recommend you to have autologin access to the live site
- You can only run the command from the root directory of your project - You can only run the command from the root directory of your project
## Customization ### Customization
If you are lazy typing the user again and again, you can define it by creating a file at `Configuration/.syncontent` with the user as the only content inside If you are lazy typing the user again and again, you can define it by creating a file in `Packages/Libraries/visay/syncontent/config/master` with the name as user of the server you want to use.
```Configuration/.syncontent ```
latest-014-073 Packages
└── Libraries
└── visay
└── syncontent
├── ansible
├── bin
├── composer.json
├── config
│   └── master
│   └── latest-014-073
└── README.md
``` ```
With this file, you can now execute the content sync with just: With this file, you can now execute the content sync with just:
...@@ -41,8 +51,12 @@ With this file, you can now execute the content sync with just: ...@@ -41,8 +51,12 @@ With this file, you can now execute the content sync with just:
bin/syncontent bin/syncontent
``` ```
# Author And the script will automatically take `latest-014-073` as the content master.
- There should be only one master at a time. That means you should not have more than more file in the `config/master` directory. In case there are more than one file exists, the script will take first file only to process.
## Author
Visay Keo <visay@web-essentials.asia> Visay Keo <visay@web-essentials.asia>
If you have any feedback, comments and/or questions, feel free to contact with email address above. And of course, a merge request is always welcome. If you have any feedback, comments and/or questions, feel free to contact with email address above. And of course, a merge request is always welcomed.
\ No newline at end of file
--- ---
# tasks file for database # tasks file for database
- name: Read remote database information (FLOW_CONTEXT=Production) - name: Read remote database info (FLOW_CONTEXT=Production)
shell: FLOW_CONTEXT=Production ./flow configuration:show --type Settings --path TYPO3.Flow.persistence.backendOptions chdir="{{ remote_path }}" shell: FLOW_CONTEXT=Production ./flow configuration:show --type Settings --path TYPO3.Flow.persistence.backendOptions chdir="{{ remote_path }}"
register: db_info register: db_info
......
...@@ -5,7 +5,7 @@ ROOT_DIR=`pwd` ...@@ -5,7 +5,7 @@ ROOT_DIR=`pwd`
PACKAGE_DIR="${ROOT_DIR}/Packages/Libraries/visay/syncontent" PACKAGE_DIR="${ROOT_DIR}/Packages/Libraries/visay/syncontent"
if [ -z "${ARG}" ]; then if [ -z "${ARG}" ]; then
MASTER=`cat ${ROOT_DIR}/Configuration/.syncontent | tr -d ' ' | tr -d '\n' | tr -d '\r' | tr -d '\t'` MASTER=`ls ${PACKAGE_DIR}/config/master | sort -n | head -1`
else else
MASTER="${ARG}" MASTER="${ARG}"
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment