Compile cfm/cfc files

Hi everyone,
I have a production server with ACF 2016 and compiled files. After each new implementation, we compile the entire environment and take it to production.

Is there any way to compile only certain files using commandbox?

Thank you!

Hi Ivan,
we create an archive from the entire source tree then post-process it to remove the compiled files we do not want to ship

Hi Dave! I was also thinking of something like this. But on a practical level, how did you do it?

we use Ant to extract the compiled archive copy the compiled files we want (or delete the files we don’t) and then re zip them

mmh, I have never used ant. do you know any guide to integrate it with coldfusion?

It is also not so clear to me how you manage everything without going crazy :slight_smile:

A practical example: on my git repository I have 3 different commits that I want to compile / move to production. What is the best way to do this?

we use jenkins for ci that runs a maven build that then calls calls commandbox and ant in my case I run up a commandbox server use a recipe to build and compile the archive then call ant tasks from maven to manipulate the resulting archive, maven then deploys the result to our repo for distribution. the sequence is controlled by the standard maven lifecycle.

it is quite complicated to set up this system (especially if you don’t know the tools) … has anyone written a guide for this stuff?

I thought I would find something simpler, like: “I only need the compiled files found in these three commits”

if you are using lucee then you could treat the archive as a zip virtual file system and use standard cfdirectory cffile tags to manipulate it

Hello Ivan,
you can create a Commandbox Task ( Task Runners - CommandBox : CLI, Package Manager, REPL & More ) to run on production server for download source from Git Repository, replace Token (Token Replacements - CommandBox : CLI, Package Manager, REPL & More) and copy to production folder if you trust :slight_smile:

At this moment I use Beyond Compare to check what is modify because i don’t trust

Hi Dave! I was also thinking of something like this. But on a practical level, how did you do it?

Ciao Emanuele,
and thanks for your input!