See original from David Grudl on https://github.com/dg/ftp-deployment
To get own *.phar
file, use command php generatePhar
. Possible options are --compress
, --file=myDeployment.phar
and finally --help
.
Sometimes I want to add custom changes, which is not merged into original repo for any reason.
Full documentation is available in the link above, here are only changes.
- Output mode is similar to
test
mode - perform no uploading/deleting operations - After the
.htdeployment
file is downloaded, changed files are determined as normal. But the names of changed/deleted files are just listed and saved into the files insidefileOutputDir
. - After the operation finished, folder
fileOutputDir
will contain the following files:createDirs.txt
- All directories to createcreateDirs.optimized.txt
- All directories to create. Omit directories into which some files are going to be uploaded. It is expected, sub-directory will be created when inserting a file into them.changedFiles.txt
- All files that are changedremoveDirs.optimized.txt
- All directories to delete. Omit the directories, which are inside another directory also scheduled for deletionremoveDirs.txt
- All directories to deleteremoveFiles.optimized.txt
- All files to delete. Omit the files, which are inside the directory scheduled for deletionremoveFiles.txt
- All files to delete
fileOutputDir = /path/to/directory
Reason why I want this?
FTP Deployment cannot upload multiple files at the same time, however, LFTP can. But LFTP cannot upload or delete only changed files (mirror
is not sufficient). I'm using this tool to find changed files and then upload them with LFTP. All together is installed in a custom Docker image at gitlab.com/pavel.kutac/docker-ftp-deployer with more examples of how to use it.
- I created pull-request which is not accepted (13.10.2018) for an unknown reason
- To show full log also in CLI, not only in
*.log
file, add to config following line with possible values yes
to disable shortening or list any of:http
,local
,remote
,upload
,exception
with space as separator- See commit a685081a
fullCliLog = http exception
Reason why I want this?
Using FTP-Deployment with after[]
action I run some Laravel commands (via routes or ssh). I want to show the full output of those commands and not only the first line.
- This was many times requested feature, but never accepted dg/ftp-deployment#104 and dg/ftp-deployment#88.
- To run
before[]
,afterUpload[]
,purge[]
,after[]
actions even not single file is changed add to config: - See commit 0eeb721a
alwaysRunActions = yes
Reason why I want this?
Using after[]
I upload config files, which is normally ignored. Like DeployHQ does. I always want to upload config files, as they are not tracked with Git or FTP-Deployment. An example is in article on my blog (Czech language only).
- Another requested feature dg/ftp-deployment/issues/20 which was rejected.
- Using the
ignoreTracked
option it is possible to ignore some files or folders, which are already tracked. All data about those tracked files are kept in.htdeployment
. So in the future after removingignoreTracked
it runs normally and syncs all files. - See commit 637a33ba
ignoreTracked = "
/vendor
/another/temporary/ignored/folder
"
Reason why I want this?
Sometimes I want to do a quick deploy, but first I have to run composer install --no-dev
, run deployment, and run composer install
which takes time. With this solution, it is possible to ignore the vendor folder, but keep those files tracked for future full deploy.