deploy

So for some time now, I’ve been trying to figure out a decent FTP deploy set up for all of the sites that I host.

I wasn’t too interested in spending any money on anything, so I went about with the decision to roll my own. After all, that was how Agile had done it via a simple PERL script that compared file mod dates, and uploaded all new files.

Given that I don’t write PERL very well, I was determined to write my on in ColdFusion. But after a few hours of trying, and reading online, I discovered <CFFTP> just doesn’t work. It’s really a damn shame, too.

Defeated, I was looking at alternatives using CFML to generate a series of temp txt files, and pass them to ftp.exe via <CFEXECUTE>. This seemed pretty lame to me if for no other reason than not knowing if your ftp transfer was successful on a granular (file by file) basis.

So I decided to turn to the DarkSide, once again, and write it all with ASP/VBScript. I found a very nice $10 ftp component that is similar in features to <CFFTP>, and proceeded to write out my scripts and loops. So far, it seems to be working pretty well, but oh(!) writing in that horrible VB script syntax. Yuck!

Sub createDir(obj_err, str_f)
  If Err.Number <> 0 Then
     '//errored on trying to change dir, 
     '//so try to create the dir instead…
     Err.Clear
     ftp.CreateDirectory(str_f)
        Call sCheckForError(err, "Failed to create directory " & str_f)
     Response.Write("<strong>" & str_f & "</strong>")

  End If
end Sub

Jan 9, 2003

11:21 pm

This entry has been tagged with: