views:

90

answers:

3

Hi folks,

I have a rather large php project with all kinds of different third party includes. Its all managed with Netbeans PHP. I have a few problems i would like some oppinions on.

  1. Does anyone build there php-project? When i upload to server via ftp i get all kinds of project files which doesnt belong to live environment.

  2. Would be nice if a build solution could encode all files when building (actually copying files to new location and leaving out project files and files like that).

Let me hear how you handle your php projects (development, test, build/deploy) with OS X.

Thanks

A: 

Though I am not an OSX user I am a Mac-in-the know. Basically I get invited to their house parties and politely decline to run amok with Windows and Linux/Unix (who is OSX's older sister, it is all so very confusing). In any case, Mac adds extra files to everything. I know when a designer is using a mac vs a pc. I get extra files and directories in their attachments if there is a folder. As far as project files, there needs to be a way to set up netbeans to keep the files for project in a different location from your working on files. If not then shame on your IDE. Well, if nothing works, since Linux/Unix is close to my heart I can write a script for you to pull all files of a list of extensions out and copy them to a new directory with subfolders in tact. Here ya are: This should work

find . -name '*.php' | xargs rsync -avuzb '{}' exportdirectory/

I do not have a machine to test it on right now and Cygwin, for all it's effort just fails sometimes. Let me know how it goes, otherwise use Unix wizardy :D Because yes, as we know OSX uses Unix command line. The crude script is mainly to give you an idea of a way you can do it. I am sure there is php, html, css, js, and other files and on rare occasion (god lets hope not) just knowing extensions isn't going to be enough.

Personally I use gvim and refuse to use project managers, I use gvim and command line and though I have used both, I am highly preferential to the current way I am doing everything. Hey, it's a choice though. No criticism here if you walk another journey.

Chisum
A: 

Well you could write a shell (or scripting language of your choice) script to selectively copy the files you want to your remote server.

Alternately, you could put the code to be published (again, leaving out the undesired files) into a version control system (git, svn, etc) and pull the code to the remote machine that way. There are lots of other benefits of using VCS as well.

You could also use something like ant to write a "build" script which does any manipulation needed for deployment.

Peter Loron
A: 

I use Eclipse PDT and mount server with Macfusion. Eclipse File Sync plugin then syncs everytihing to mounted drive (can exclude unwanted files/directories).

Also using a SVN and opening project directly from remote drive with Eclipse and including libraries from project properties. So there is two projects - one for local development and other is live in server - syncronized with SVN

(Eclipse plugin Clay for database diagrams is awsome too)

Valter