Uploading FWP Sites?

As part of my workflow, I do all of my development work locally on a network server that me and my clients access via the Internet. Of course my live sites live on a GoDaddy server elsewhere.

As all you Freeway Pro users know, Document Setup has a tab to enter upload information, which makes the process of publishing and uploading updated FWP documents much easier.

Is there anyway to set a secondary upload location, one for development uploads and the other for live uploads or does that cause issues with FWP?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Kelly,
Freeway allows you to enter both file copy and FTP information in the File > Document Setup > Upload tab which means you can easily switch between these. This assumes that you can transfer the files to your local development server using a file copy rather than FTP (or one of the secure variants). If not you could look into creating a watch folder and use a dedicated FTP app like Transmit to monitor the folder for changes and upload the files it needs.

The simplest solution is to use an AppleScript (one of the few things you can control in Freeway through an AppleScript) to force Freeway to upload your site to your desired server. For example;

tell application "Freeway Pro"
	if exists document 1 then
		upload document 1 via ftp server "ftp.example.com" directory "public_html/testing/" user "user.example.com" password "demo"
	end if
end tell

Copy this code into Applescript Editor, change the FTP details and save it as an application with run only, startup screen and stay open all unchecked in the options. Now if you run the script it will FTP the frontmost document into the server space you specified in the script.

As with most things in life there are a few things to consider;

  1. Your FTP details are available to view if anyone should find this script and open it up in AppleScript Editor.
  2. Freeway actually stores the FTP details used in the script in the document (File > Document Setup > Upload). Personally I think this is a bug so if you do switch between servers then create a script for each server and make sure you use the correct script for the right server.
  3. Make sure your FTP details are correct before you try and run the script as Freeway has a habit of crashing if you get them wrong
  4. There is very little error checking in the script above. A more robust solution may be to check the document against the server details so that you can’t accidentally upload one site into the wrong server space. I’ll leave that as a task for the avid reader! :slight_smile:
    Regards,
    Tim.

On 9 Apr 2013, at 19:23, RavenManiac wrote:

Is there anyway to set a secondary upload location, one for development uploads and the other for live uploads or does that cause issues with FWP?


Experienced Freeway designer for hire - http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Tim. Sorry for the delay in responding. Wow! Thanks for all your help and great information. I’m currently uploading my FWP files to my local server via the FTP option. I’ll try use File Copy instead. If this works it’ll be really helpful. :slight_smile:


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Tim, on the Document Setup page under the File Copy option there’s a field for Web Address. Should I enter the live website address or the development server website address, which is basically a subdomain?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Kelly,
The URL field isn’t used for uploading or transferring the site files but gets used for various Actions that need to know the absolute path to certain files in your site. The Create Email Action (for example) uses this address to work out the absolute paths to your image files. You should really change the development address for the live server address before uploading to the live site as any Actions that use this address will try (and fail if it is unreachable) to point back to your development server from the live site.
Regards,
Tim.

On 10 Apr 2013, at 19:21, RavenManiac wrote:

Tim, on the Document Setup page under the File Copy option there’s a field for Web Address. Should I enter the live website address or the development server website address, which is basically a subdomain?


FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

So then the FTP should be my live server address and the File Copy should be my development server address, correct?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you can copy to your development server without using FTP then yes, that would be ideal as you can switch between the two options as you see fit.
Regards,
Tim.

On 10 Apr 2013, at 20:32, RavenManiac wrote:

So then the FTP should be my live server address and the File Copy should be my development server address, correct?


FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Sounds good. Just so I understand the process, whether I use FTP to upload files to my live server or File Copy to upload files my development server, basically Freeway is doing nothing more than uploading the Site Folder to the respective servers.

Which means, than anything that exists on said servers (i.e. CMS files, special apps, etc.) will remain, unless there is a naming conflict that would force an overwrite. Is that correct?

In thinking this through the only problem with this setup is there would only be one copy of the clients website, instead of a development copy and a live copy. With existing clients I often times experiment on the development server with any changes they request, while the live copy is active.

Perhaps a better solution would be to have two FWP files. One entitled website-live.freeway and website-dev.freeway. I guess I could have both a File Upload and an FTP upload option for website-dev.freeway.

How do you deal with this from a workflow perspective?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Kelly,

On 10 Apr 2013, at 20:47, RavenManiac wrote:

Which means, than anything that exists on said servers (i.e. CMS files, special apps, etc.) will remain, unless there is a naming conflict that would force an overwrite. Is that correct?

Freeway leaves anything that is doesn’t ‘own’ that is finds on the server well alone. If it needs to it will rename its own files rather than overwrite a foreign file.

How do you deal with this from a workflow perspective?

Yes I can see that working out although you do lose the flexibility of trying something out on your development copy of the site only to have to manually move it over to the live Freeway file. I’d be inclined to work with a single Freeway file and roll back any changes I didn’t want using either Time Machine or DropBox. That way you don’t have two site files to keep in sync.
Regards,
Tim.

FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On Apr 10, 2013, at 3:47 PM, RavenManiac wrote:

Sounds good. Just so I understand the process, whether I use FTP to upload files to my live server or File Copy to upload files my development server, basically Freeway is doing nothing more than uploading the Site Folder to the respective servers.

It’s a little more subtle than that. Freeway will only upload the files that it manages, and that it believes are currently newer than their respective counterparts on the server. It uses timestamps to figure this out, asking the server for a directory listing of each folder it moves into, and then comparing the timestamps with its internal record of those same files. It won’t know if a file on the server was made by it or not, but it will only try to upload the files that it knows need updating according to this time scheme.

When publishing locally, Freeway maintains an actual Mac file handle to the files it creates, and it “knows” when you try to publish over a file with the same name that is not actually the same file. That’s the alert you may see from time to time.

Which means, than anything that exists on said servers (i.e. CMS files, special apps, etc.) will remain, unless there is a naming conflict that would force an overwrite. Is that correct?

If Freeway (or an Action) didn’t create those files, then Freeway will ignore them utterly (absent the whole name choice we discussed already). One other thing you need to worry about when interacting with third-party code is that if Freeway gets confused in your local folder, it will cheerfully rename images and other “resources” to avoid stepping on local files that it doesn’t recognize. This is often how you will end up with item42aaaaab1b1.png in your Resources folder. If you’ve carefully named something alert.png (so it will be used by the CMS for an alert panel) and Freeway renames it alert1.png because there’s another alert.png in your local folder, what will happen is that your server will end up with alert1.png and NO alert.png (the conflict is only on your Mac). You won’t get any warning about this either, just a missing image icon in your production site. The trick to work around this is to create a new Site Folder in the Document Setup / Output dialog. This gives a clean slate and all names will return to whatever you set them in the Inspector.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

At 15:47 -0400 10/4/13, RavenManiac wrote:

Sounds good. Just so I understand the process, whether I use FTP to
upload files to my live server or File Copy to upload files my
development server, basically Freeway is doing nothing more than
uploading the Site Folder to the respective servers.

Which means, than anything that exists on said servers (i.e. CMS
files, special apps, etc.) will remain, unless there is a naming
conflict that would force an overwrite. Is that correct?

In thinking this through the only problem with this setup is there
would only be one copy of the clients website, instead of a
development copy and a live copy. With existing clients I often
times experiment on the development server with any changes they
request, while the live copy is active.

Perhaps a better solution would be to have two FWP files. One
entitled website-live.freeway and website-dev.freeway. I guess I
could have both a File Upload and an FTP upload option for
website-dev.freeway.

How do you deal with this from a workflow perspective?

My test server is the same Mac that I run FW on, and I keep my FW
stuff in my Sites folder. I’ve just configured Apache so that
http://localhost/~david serves from /Users/david/Sites. That way
http://localhost/~david/site-name/site is the ‘site’ folder that FW
publishes into for ‘site-name’. I don’t have to copy anything
anywhere to test locally.

David


David Ledger - Freelance Unix Sysadmin in the UK.
email@hidden
www.ivdcs.co.uk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 10 Apr 2013, 7:58 pm, Tim Plumb wrote:

Hi Kelly,

How do you deal with this from a workflow perspective?

Yes I can see that working out although you do lose the flexibility of trying something out on your development copy of the site only to have to manually move it over to the live Freeway file. I’d be inclined to work with a single Freeway file and roll back any changes I didn’t want using either Time Machine or DropBox. That way you don’t have two site files to keep in sync.
Regards,
Tim.

Thanks Tim. I never thought about using Time Machine. Clearly one FWP file would be a lot easier to maintain. I may give that a try, but I’m curious to know what other FWP users are doing in terms of a website development workflow.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On 10 Apr 2013, 7:27 pm, Tim Plumb wrote:

Hi Kelly,
The URL field isn’t used for uploading or transferring the site files but gets used for various Actions that need to know the absolute path to certain files in your site. The Create Email Action (for example) uses this address to work out the absolute paths to your image files. You should really change the development address for the live server address before uploading to the live site as any Actions that use this address will try (and fail if it is unreachable) to point back to your development server from the live site.
Regards,
Tim.

Tim, I just tried updating this info and the Web Address field for File Copy and FTP, although in different dialogs, is exactly the same information. Whatever you enter in one, will be copied to the other.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, I asked Softpress Tech Support about this and here’s the response I received from Keith, so it would appear that you can only choose one option to upload files at a time.


Hi Kelly

This is something we’ve had a few requests to include for a future update of Freeway, and it is quite likely that it will appear one day soon - but I’m afraid that I can’t give a timing for when exactly this will be.

The reason for the need to put in the web address in the field of the Upload dialog is so that the URL can be written into the path names for certain functionality offered by Freeway Actions.

For the time being I’m afraid you’ll need to change things at the last minute before choosing the upload/file copy method each time (which with the aid of a sticky note on the Desktop can be a very quick task) - though I understand that in a perfect world this would be remembered by the upload method each time.

Best regards

Keith Rigley
Support Technician
Softpress Systems


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options