Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically sync to a local folder/project in Aptana Studio 3?

Tags:

aptana

I'm able to set up a connection in project A between two local folders, from project A to project B. Manual upload/download is then possible using the contextual menu in project A. But how about automatic sync between the two locations? I see this possible for protocols such as FTP, but not when the target is a local directory. Is this a missing feature, or is there a trick?

Edit: the answer/comments below explain that in fact Aptana sync feature is not a full sync logic but rather an 'upload when saving' feature that only gets triggered upon saving a file in eclipse. I would advise Apatana to rename it accordingly because it can be confusing. With this new understanding the answer below makes more sense.

For more background info here's my setup for one web site:

A) Several development projects: one core PHP framework project (drupal) which links (as in eclipse linked folders) to several module projects. Core and module projects are separate eclipse projects with their own git repo cloned from upstream repos on drupal.org. This way upgrading a module can be done independently from other modules and from core.

B) One development server project: contain the files to be deployed on the development web server. Needs to be a copy of the core project mentioned above in A), except that modules which are linked folders in core source project but need to become plain files copies in this project. This project has its own git repository different from the above repositories, and serves the purpose of snapshoting the whole web site.

C) One production server project: contain the files to be deployed on the live web server. Uses a separate branch in a clone of the development server repo from B)

I was hoping Aptana Studio could automate the sync between A to B. Manual operations work fine, linked resources are copied from A to B. However I'd like this process to be automatic, i.e. when files change in project A, they're automatically copied to project B.

like image 374
fmjrey Avatar asked Feb 24 '23 02:02

fmjrey


1 Answers

There is a workaround, using a FTP server as a bridge:

  1. Set up a connection from Project A to a FTP server (http://wiki.appcelerator.org/display/tis/FTP%2C+SFTP%2C+and+FTPS+Deployment) and make sure "Automatically sync my changes with the remote site" is selected;

  2. Set up a connection from Project A to Project B using the right-click menu Deploy > Connections > Add New Connection;

  3. Right-click on Project A and select Properties > File Transfer, then in the Connection combo box, select Project B and check "User the connection as default".

Now when you save a file modification in Project A, it should get automatically uploaded to Project B.

Hope this helps.

like image 116
Yun Avatar answered Apr 28 '23 16:04

Yun