TIBCOSoftware / flogo-cli

Project Flogo Command Line Interface
http://flogo.io
BSD 3-Clause "New" or "Revised" License
57 stars 28 forks source link

Allow for a new type of shim called gobuild #101

Closed retgits closed 6 years ago

retgits commented 6 years ago

What kind of change does this PR introduce? (check one with "x")

[] Bugfix
[X] Feature
[] Code style update (formatting, local variables)
[] Refactoring (no functional changes, no api changes)
[] Other... Please describe:

What is the current behavior? The current triggers require external dependencies to be able to build (like make for the Lambda trigger). This requires the developer to install additional software (which may or may not be available for his operating system)

What is the new behavior? With this PR we can introduce the ability to have each trigger specify their own build steps using a gobuild.go file. So trigger developers can write their build steps using a go file and assuming the trigger shim is set to gobuild in the activity.json the flogo build -shim <id> command will execute the new build file. This removes the need to install additional software like Make

Have you tested this? I've tested the new behavior on Windows 10 and Ubuntu 18.04, creating Flogo apps deployed to Lambda.

Note I've made the changes additive so that existing triggers that use the shim options (like Lambda and CLI) are not broken and developers can continue to use their existing workflow.

retgits commented 6 years ago

Good idea... and implemented with the latest update to this PR :)

New logic: Check if the gobuild exists, if so execute it, else see if there was a Makefile.

retgits commented 6 years ago

By popular demand updated the name of the build file to build.go ;-)