Coder Social home page Coder Social logo

banago / phploy Goto Github PK

View Code? Open in Web Editor NEW
1.4K 56.0 195.0 24.51 MB

PHPloy - Incremental Git (S)FTP deployment tool that supports multiple servers, submodules and rollbacks.

Home Page: http://wplancer.com/phploy/

PHP 96.49% Batchfile 1.45% Shell 1.45% Dockerfile 0.61%
deployment workflow

phploy's People

Contributors

baldurpan avatar banago avatar bastien-boussouf avatar bkarstaedt avatar craftpip avatar decanus avatar dependabot[bot] avatar dl1ely avatar dreadnaut avatar dsturm avatar euphorbium avatar fabwu avatar fadion avatar fsalomon avatar guidohendriks avatar jarbitlira avatar jaybizzle avatar jjeaton avatar lewisvgd avatar martin-sucha avatar martinkryl avatar mbrugger avatar mikaelz avatar ogrosko avatar peterbrinck avatar plashenkov avatar saibotd avatar schnoop avatar thyyppa avatar vstelmakh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phploy's Issues

Ask for (s)ftp password if not specified

It would be good the console ask for the ftp password if this is blank in the configuration file, this way is can versioning the deploy.ini file without compromising the security of the server.

Passing path of repository to phploy

It would be good thing to have an option to pass the path of the repository to phploy through parameters, so you don't have to be in the repository folder and use it as a shortcut or, for example, custom action from SourceTree.

Web interface

It does not need to be implemented now but why developing thing about this. A powerful deploy tool need to have a web interface.

Logging PHPloy Output

I often want to check when I last made a deployment, and a log file would be really handy. It's a relatively easy patch to enable logging to a text file (in addition to output on the screen), which I'm keen to write soon. But my only question is how it should be configured in deploy.ini.

  • Should you specify a log file per environment? Or one overall?
  • How can we make configuration work with both quickmode and verbose mode?
  • Should the filename accept strftime-compatible date variables, perhaps like: deployments %y %m.log?
  • Should you be able to specify the level of detail/verbosity written to the log file?

Exclamation Mark on password causes termination of phploy

Hello there,

Props on the fantastic nifty tool you've made.

Couple of minutes ago, I wanted to phploy to a server which had a password consisting of an exclamation mark, just to have PHPloy throw me this exception:

Warning: parse error in deploy.ini on line 18
 in /usr/local/bin/phploy on line 367

Oh Snap: 'deploy.ini' is not a valid .ini file.

The exclamation mark was at the end of it to be more precise.
Tried escaping it with a backlash, or throwing the whole string within quotes but to no avail.

FTPS settings

I don't know if this is the right place to ask, but here it is. I've been getting the error: "Unable to connect." I should be using FTPS, and In FileZilla I use the setting: "require explicit ftp over tls." I also have the following settings:

user = [email protected]
pass = mypassword
host = ftp.me.com
path = /
port = 21
passive = true

I am using Windows, so I am worried that something is missing from my PHP build. Is there anything I am leaving out?

git command error

When I try to run the command "phploy" on my git project the following message comes out:

Oh snap: PHPloy attempted to run the following console command but it failed: git --git-dir=^"D:\server^\auto.git^" --work-tree=^"D:\server^\auto^" submodule status

Revision file incorrect if committing during deployment

I might be incorrect but I've noticed this a few times --

If I'm doing a long deployment, say an initial deployment of many thousands of files, then make commits during that deployment the .revision file on the server is incorrectly updated to the latest local revision. i.e.: the revision when deployment completed, not when it was started.

When detected I just sync the server to the correct revision; however sometimes this is not picked up and files are missing or outdated on the server as a result.

How to re-produce: Make a local commit whilst phploy is deploying.

How do submodules work?

This is a great tool, but I'm trying to upload a Yii2 project, and I have a vendor folder with all my modules, but none of them are uploaded.

I'm not really sure if the modules in the vendor folder are submodules.

Any solutions for this?

Deploy one source to different folders (for example: secure & public files)

Is it possible to deploy certain folders/files to different locations?

For example I would like my public files (such as assets) to be deployed into the public web root:
/domains/domain.com/public_html/

However the framework/config code should go to a non-public location such as:
/domains/domain.com/framework/

That would be a neat feature to have. :)

Pre/Post deployment commands

Just noting this down as a discussion point for a possible future feature.

My current deployment workflow, using dploy.io, allows me to run shell commands on my server after the deployment has complete. I usually have a minimum of composer install getting executed after my deployments. It would be nice for PHPloy to have such a feature.

Thoughts?

Change file name on deployment

A way to change file names.
Ex.

system.ini // Dont deploy
system.live.ini => system.ini // Change name for live server

Problem with the new version (feature to SFTP

I am trying to connect to an SFTP Server..

PHP Fatal error: Call to a member function exists() on a non-object in phar:///var/www/mysite/phploy.phar/src/PHPloy.php on line 480
PHP Stack trace:
PHP 1. {main}() /var/www/mysite/phploy.phar:0
PHP 2. include() /var/www/mysite/phploy.phar:10
PHP 3. Banago\PHPloy\PHPloy->__construct() phar:///var/www/mysite/phploy.phar/phploy.php:11
PHP 4. Banago\PHPloy\PHPloy->deploy() phar:///var/www/mysite/phploy.phar/src/PHPloy.php:221
PHP 5. Banago\PHPloy\PHPloy->compare() phar:///var/www/mysite/phploy.phar/src/PHPloy.php:563

password problem

Hi I have a password like ]or~%H]Q%&75 this in my deploy.ini but its showing error telling me unexpected ~

can you help??

Turn off submodules by default

Hey @SimonEast,

I find myself that submodules are actually updates very rarely and the checks are kind of in vain on every single deploy.

What do you think about turning it off by default and adding a --submodules options if we want to run a check for submodules too.

Ignore files/folders

Would be great to be able to ignore files and folders that we do want in the repo, but not on the server. I'm thinking raw SASS, node modules and the such.

Deploying to single server by default

The current behaviour is to deploy to every defined server, unless one specifies it via the --server argument. Personally, I think this leads to problems.

If I have a staging and production server, I want to upload selectively. First to staging, test it, then to production. The problem is that it's quite easy to forget the --server argument and upload to both, while the intention was to deploy to staging.

As most of the time deployment is aimed at a single server, I'd suggest making that the default. It would need an additional config option, default = server_name, that defines the default server where deployment is done when running just phploy. If the default option isn't set, it can use the first server automatically.

For deploying to aspecific or multiple servers, the --server argument could be an array. Ie: phploy --server=name for single (as it currently is) and phploy --server=name1 --server=name2 for multiple.

What do you guys think?

Installing through Composer

Personally I use composer a lot an I would be glad if you can make it available through composer as well.

deploy only contents of a selected folder

Would it be possible to have the ability to deploy only the contents within a set folder?

For example; when I develop, I develop, the stuff that I want to have sent to the server would be inside a www/ folder. the rest of the stuff in the root is sh scripts that we track or vagrant related and wouldn't want these on production.

Deploying to all servers should require a --all parameter

The default behaviour of uploading to all servers could cause problems if people use the setup for different environments as the example deploy.ini shows. It's highly unlikely people would want to deploy to development, staging and production environments all at the same time. A --all parameter or something similar seems more logical than defaulting to deploying everywhere.

Unknown git-diff status: T

It seems PHPloy doesn't know how to handle a scenario where the type of a file has changed. This means that it blocks any further deployments with the error:

Oh Snap: Unknown git-diff status: T

An example would be to have a directory in the local repository which is removed and then replaced with file of the same name.

Add Support for Rollbacks

Support for rollback to earlier version is being developed. You can view progress on the rollbacks branch.

It is expect to allow you to rollback to previous version by running:

phploy --rollback

Or to a more earlier version by running:

phploy --rollback revision-id

Suggestions are welcome.

No upload on fresh repo

It doesn't seem to upload on a freshly started repo with no revision on the server. Have made a few tests and the regression must have been introduced in a3e55e6.

I'm running phploy with no parameters, on a repo with the same exact files and a single server configured. Tried a few versions of phploy before a3e55e6 and uploading worked fine. After a3e55e6, I'm just getting No files to upload, even though there are files to upload.

Sometimes file numbering is off

Sometimes file operation numbering starts from 2, e.g. "uploaded 2 of 184" and ends with "uploaded 185 of 184". Not really sure when it happens, but I caught it two times already. Using latest beta on Windows.

Coding style and minor optimizations

Let's put this as the next step. It won't take much, but it's a needed one. Also, minor optimizations to code could be acheived in this phase, mostly for legibility, thrown exceptions, etc.

Possibility to first deploy without upload all files

Feature request: possibility to first deploy without uplod all files

"The first time it's executed, PHPloy will assume that your deployment server is empty, and will upload all the files of your project."

My server is NOT empty and i don't want to send again ALL files on start, only last commit.

Issues with rollback command

There's currently two issues with the --rollback command.

  1. It doesn't handle submodules correctly. See source code note here.
  2. It returns the working copy to the master branch, which may not be what the user intended. See source code note here.

I'm unlikely to have time to fix these any time soon unfortunately, but if anyone else wants to have a go, feel free. πŸ‘

Manage branches

hi,

is it possible to manage several branches ?
i mean a way to upload changes from dev branch to a dev branch server configuration and master branch changes to a master branch server configuration ?

PHPloy v3

Hi guys,

I have some exciting news to share. I took a good chunk of time to add a feature that I was needing a lot lately and that is sFTP support: https://github.com/banago/PHPloy/tree/feature/secure

To do that, I made use of this great library here: https://github.com/tangervu/Connection.php (1) which I ended up forking to make several improvements to play well with PHPloy and to make it a composer package. You can fine it here: https://github.com/banago/Bridge

This means PHPloy will be a Phar in the future, much like composer. To load depencencies, (only Brige for now) please run composer install. To build the phar, all you need to do is run: php build.

Things seem to work fine, expect the fact that the phar won't work globally on my laptop. It only works locally. A lot of testing is needed. And a lot of further work and fine-tuning too.

@fadion can you help with overall architecture of PHPloy package. Perhaps bring some work from Maneuver over and then you can just drop PHPloy as a dependency on Maneuver. I know you are the right guy for this. 😸

@SimonEast your Windows testing and development is indispensable πŸ‘

@JayBizzle could you please add those improvements you added to master branch to feature/secure branch too. That would be awesome.

@oxodesign, @reinink, @rupaheizu and everybody else your contributions are more then welcome and very appreciated.

Thanks everyone.

(1) Connection.php is now a composer package too. Was updated after this was posted.

Can you specify staging/production servers in the one deploy.ini file?

This looks awesome, just the kinda thing I need. Gonna attempt to try it out tomorrow, but just wondered if there might be a way to specify separate settings for staging/production servers, so you could do something like

phploy production
or
phploy staging

I realise that this was probably intended for a workflow where you have separate Git branches for staging/production in which case a different deploy.ini file for each. I sometimes do that, but for simpler projects with mostly linear development, it's nice to deploy to staging, get approval from the client and then run 1 command to get that on production.

I might even see if I can build that feature myself.... hmmm...

(Also, from a quick glance, shouldn't the deploy.ini file be in $files_to_ignore? It should also ignore the entire .git folder.)

Thanks for sharing this.

Simon.

Is quickmode necessary?

Varied options are a good thing as long as they're complementary and don't confuse users. I believe quickmode doesn't classify. Except for being confusing, it's difficult to read and can lead to incorrect parsing if certain characters (colon, slashes) that break the url scheme are present.

I'd suggest keeping the "long" server configs only. They're even easier to write!

does not give any error , does not connect

When I do -> phploy --list it says connecting to production server, and nothing more, exits with error 255. I have specified in deploy.ini all credentials. Could it be that because my username on ftp contains dot character like de.munze? It does not give any clue of what might have happened, could not connect to server, or no such directory or whatever.

PHPloy in window 64 bit

I run on my computer window 7 64bit and get this error. Please help me to fixe them. Thanks.

test

Bug with gitlab

Hello,

When I run 'phploy' in my git folder, PHPloy tell me :
"Oh Snap: '/var/opt/gitlab/git-data/repositories/jbm/testing.git' is not Git repository."
I use PHPloy (last version) and Gitlab omnibus 6.9

Test Suite

I had some time the other day to get back involved in writing some more updates but then I remembered what a pain it was to do any kind of testing the last time I contributed.

I just wondered how you or any other contributors test their contributions, and have you thought about putting some kind of test suite together to facilitate automated testing? Im no expert in this field, but it is something most projects have these days, and definitely something i'd like to get involved with to further my own knowledge in this area.

Strange submodule detection

Hello,

I got a lot of issus with my submodule. I have a repository with 4 submodule et one of them have a submodule too.
But the script found wierd thing:

---------------------------------------------------
|              phploy v2.0.0                |
---------------------------------------------------

Scanning repository...
   Found 4 submodules.
   Found submodule plugins/chartetypo. Scanning for sub-submodules...
      Found sub-submodule plugins/chartetypo/dans.
      Found sub-submodule plugins/chartetypo/dans.
      Found sub-submodule plugins/chartetypo/dans.
      Found sub-submodule plugins/chartetypo/lib/array_column.
      Found sub-submodule plugins/chartetypo/dans.
   Found submodule plugins/courtjus. Scanning for sub-submodules...
      Found sub-submodule plugins/courtjus/dans.
      Found sub-submodule plugins/courtjus/dans.
      Found sub-submodule plugins/courtjus/dans.
      Found sub-submodule plugins/courtjus/lib/array_column.
      Found sub-submodule plugins/courtjus/dans.
   Found submodule plugins/spip_array_column. Scanning for sub-submodules...
      Found sub-submodule plugins/spip_array_column/dans.
      Found sub-submodule plugins/spip_array_column/dans.
      Found sub-submodule plugins/spip_array_column/dans.
      Found sub-submodule plugins/spip_array_column/lib/array_column.
      Found sub-submodule plugins/spip_array_column/dans.
   Found submodule plugins/zoundation. Scanning for sub-submodules...
      Found sub-submodule plugins/zoundation/dans.
      Found sub-submodule plugins/zoundation/dans.
      Found sub-submodule plugins/zoundation/dans.
      Found sub-submodule plugins/zoundation/lib/array_column.
      Found sub-submodule plugins/zoundation/dans.

All sub-submodule are wrong, except for plugins/spip_array_column/lib/array_column.
This dans. folder doesn't even exist.

The V3 have the same problem but, act differente:

---------------------------------------------------
|              PHPloy v3.0.7-alpha                |
---------------------------------------------------

Scanning repository...
   Found 4 submodules.
   Found submodule plugins/chartetypo. 
      Scanning for sub-submodules...
      Found sub-submodule plugins/chartetypo/dans.
      Found sub-submodule plugins/chartetypo/dans.
      Found sub-submodule plugins/chartetypo/dans.
      Found sub-submodule plugins/chartetypo/lib/array_column.
      Found sub-submodule plugins/chartetypo/dans.
   Found submodule plugins/courtjus. 
      Scanning for sub-submodules...
      Found sub-submodule plugins/courtjus/dans.
      Found sub-submodule plugins/courtjus/dans.
      Found sub-submodule plugins/courtjus/dans.
      Found sub-submodule plugins/courtjus/lib/array_column.
      Found sub-submodule plugins/courtjus/dans.
   Found submodule plugins/spip_array_column. 
      Scanning for sub-submodules...
      Found sub-submodule plugins/spip_array_column/dans.
      Found sub-submodule plugins/spip_array_column/dans.
      Found sub-submodule plugins/spip_array_column/dans.
      Found sub-submodule plugins/spip_array_column/lib/array_column.
      Found sub-submodule plugins/spip_array_column/dans.
   Found submodule plugins/zoundation. 
      Scanning for sub-submodules...
      Found sub-submodule plugins/zoundation/dans.
      Found sub-submodule plugins/zoundation/dans.
      Found sub-submodule plugins/zoundation/dans.
      Found sub-submodule plugins/zoundation/lib/array_column.
      Found sub-submodule plugins/zoundation/dans.

SERVER: production
   No files to upload.

SUBMODULE: plugins/chartetypo
   No files to upload.

SUBMODULE: plugins/chartetypo/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/chartetypo/dans/.git'
   No files to upload.

SUBMODULE: plugins/chartetypo/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/chartetypo/dans/.git'
   No files to upload.

SUBMODULE: plugins/chartetypo/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/chartetypo/dans/.git'
   No files to upload.

SUBMODULE: plugins/chartetypo/lib/array_column
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/chartetypo/lib/array_column/.git'
   No files to upload.

SUBMODULE: plugins/chartetypo/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/chartetypo/dans/.git'
   No files to upload.

SUBMODULE: plugins/courtjus
|----[ No revision found. Fresh deployment - grab a coffee ]----|
Created directory 'plugins/courtjus/'.
 ^  1 of 13 plugins/courtjus/courtjus_administrations.php
 ^  2 of 13 plugins/courtjus/courtjus_fonctions.php
 ^  3 of 13 plugins/courtjus/courtjus_pipelines.php
 ^  4 of 13 plugins/courtjus/fabrique_courtjus.php
Created directory 'plugins/courtjus/formulaires/'.
 ^  5 of 13 plugins/courtjus/formulaires/configurer_courtjus.html
 ^  6 of 13 plugins/courtjus/formulaires/configurer_courtjus.php
Created directory 'plugins/courtjus/lang/'.
 ^  7 of 13 plugins/courtjus/lang/courtjus_fr.php
 ^  8 of 13 plugins/courtjus/lang/paquet-courtjus_fr.php
 ^  9 of 13 plugins/courtjus/paquet.xml
Created directory 'plugins/courtjus/prive/'.
Created directory 'plugins/courtjus/prive/squelettes/'.
Created directory 'plugins/courtjus/prive/squelettes/contenu/'.
 ^ 10 of 13 plugins/courtjus/prive/squelettes/contenu/configurer_courtjus.html
Created directory 'plugins/courtjus/prive/themes/'.
Created directory 'plugins/courtjus/prive/themes/spip/'.
Created directory 'plugins/courtjus/prive/themes/spip/images/'.
 ^ 11 of 13 plugins/courtjus/prive/themes/spip/images/courtjus-128.png
 ^ 12 of 13 plugins/courtjus/prive/themes/spip/images/courtjus-32.png
 ^ 13 of 13 plugins/courtjus/prive/themes/spip/images/courtjus-64.png

SUBMODULE: plugins/courtjus/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/courtjus/dans/.git'
   No files to upload.

SUBMODULE: plugins/courtjus/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/courtjus/dans/.git'
   No files to upload.

SUBMODULE: plugins/courtjus/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/courtjus/dans/.git'
   No files to upload.

SUBMODULE: plugins/courtjus/lib/array_column
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/courtjus/lib/array_column/.git'
   No files to upload.

SUBMODULE: plugins/courtjus/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/courtjus/dans/.git'
   No files to upload.

SUBMODULE: plugins/spip_array_column
|----[ No revision found. Fresh deployment - grab a coffee ]----|
Created directory 'plugins/spip_array_column/'.
 ^  1 of 11 plugins/spip_array_column/.gitmodules
 ^  2 of 11 plugins/spip_array_column/arraycolumn_options.php
 ^  3 of 11 plugins/spip_array_column/fabrique_arraycolumn.php
Created directory 'plugins/spip_array_column/lang/'.
 ^  4 of 11 plugins/spip_array_column/lang/arraycolumn_fr.php
 ^  5 of 11 plugins/spip_array_column/lang/paquet-arraycolumn_fr.php
Created directory 'plugins/spip_array_column/lib/'.
 ^  6 of 11 plugins/spip_array_column/lib/array_column
 ^  7 of 11 plugins/spip_array_column/paquet.xml
Created directory 'plugins/spip_array_column/prive/'.
Created directory 'plugins/spip_array_column/prive/themes/'.
Created directory 'plugins/spip_array_column/prive/themes/spip/'.
Created directory 'plugins/spip_array_column/prive/themes/spip/images/'.
 ^  8 of 11 plugins/spip_array_column/prive/themes/spip/images/array_column.psd
 ^  9 of 11 plugins/spip_array_column/prive/themes/spip/images/arraycolumn-128.png
 ^ 10 of 11 plugins/spip_array_column/prive/themes/spip/images/arraycolumn-32.png
 ^ 11 of 11 plugins/spip_array_column/prive/themes/spip/images/arraycolumn-64.png

SUBMODULE: plugins/spip_array_column/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/spip_array_column/dans/.git'
   No files to upload.

SUBMODULE: plugins/spip_array_column/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/spip_array_column/dans/.git'
   No files to upload.

SUBMODULE: plugins/spip_array_column/dans
|----[ No revision found. Fresh deployment - grab a coffee ]----|
fatal: Not a git repository: '/home/phenix/Sites/Personnel/henix/plugins/spip_array_column/dans/.git'
   No files to upload.

SUBMODULE: plugins/spip_array_column/lib/array_column
|----[ No revision found. Fresh deployment - grab a coffee ]----|
PHP Warning:  ftp_chdir(): plugins/spip_array_column/lib/array_column/: No such file or directory in phar:///usr/local/bin/phploy.phar/vendor/banago/bridge/src/Backend/Ftp.php on line 100
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/phploy.phar:0
PHP   2. include() /usr/local/bin/phploy.phar:10
PHP   3. Banago\PHPloy\PHPloy->__construct() phar:///usr/local/bin/phploy.phar/phploy.php:11
PHP   4. Banago\PHPloy\PHPloy->deploy() phar:///usr/local/bin/phploy.phar/src/PHPloy.php:221
PHP   5. Banago\PHPloy\PHPloy->push() phar:///usr/local/bin/phploy.phar/src/PHPloy.php:584
PHP   6. Banago\Bridge\Bridge->cd() phar:///usr/local/bin/phploy.phar/src/PHPloy.php:710
PHP   7. Banago\Bridge\Backend\FTP->cd() phar:///usr/local/bin/phploy.phar/vendor/banago/bridge/src/Bridge.php:52
PHP   8. ftp_chdir() phar:///usr/local/bin/phploy.phar/vendor/banago/bridge/src/Backend/Ftp.php:100

Oh Snap: Changing directory to 'plugins/spip_array_column/lib/array_column/' failed

What can I do ?

Syntax Errors Check Before Deployment

Embarrassingly enough only today was I able to come across this little nice utility in PHP - syntax checking form the terminal.

php -l filename.php

Out if this, I wrote a little bash script to do this check before the commit, but I don't really bother if I do a commit with errors.

On the other hand it is really important that we don't do a deploy with errors. And guess what, I've done it, it's time consuming and sometimes embarrassing when the clients tells you there is an error in the website, because you where to lazy to check.

So, we are going to have this feature built into PHPloy.

I suggest we have it on by default and have an option to deactivate it like --no-check when we are doing an initial deploy or similar scenarios to save some seconds.

You feedback on this is very welcome.

Problem uploading files with special chars

I have found a bug in the script. I'have tried to upload a file in my test environment.

Failed to upload "...../02 Vollmacht (f\303\274r Dritte).pdf". Retrying (attempt 2/10)...
PHP Warning: ftp_put("......../02 Vollmacht (f\303\274r Dritte).pdf"): failed to open stream: No such file or directory in /usr/local/bin/phploy on line 698

So there are special chars like Γ€ or ΓΌ and so in the name of the files. In this cases its not working.

After running the script i have two folders in the ftp folder.

"web and web without the quote.

Windows Issues

Following installation instructions word for word, yet running phploy within project prompts that phploy is not a recognized command. This is after adding php.exe and path to phploy to environment variables.

It does work if I place phploy and phploy.bat in my project folder, but it would be nice to not have to do this with each project, as that is what the installation instructions indicate by using it globally.

Choose which branch deploy

It would be interesting if we can set on deploy.ini which branch use to deploy. I use capifony to deploy my Symfony projects and it has this helpful feature.

Thx.

Add commit hashes to output

It would be great if the output in the CLI would display the commit hashes that the files are being deployed from/to. Sometimes when you deploy and you have multiple commits in between and you want to rollback quickly, it can take a while to find which commit to rollback to. If you could just look in the CLI history to see what you just deployed that would be great.

Also a command to retrieve the current commit hash that is on the server would be great too.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.