Add a development mode for contributions in "flogo ensure"#3
Open
debovema wants to merge 3 commits intosquare-it:ensure-development-modefrom
Open
Add a development mode for contributions in "flogo ensure"#3debovema wants to merge 3 commits intosquare-it:ensure-development-modefrom
debovema wants to merge 3 commits intosquare-it:ensure-development-modefrom
Conversation
2e797ea to
ca80fe4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce? (check one with "x")
Fixes: N/A
What is the current behavior?
When developing a contribution for Flogo, it is often mandatory to make updates in core repositories of Flogo (such as TIBCOSoftware/flogo-contrib and TIBCOSoftware/flogo-lib repositories). Before a Pull Request can be created, these updates are commited and pushed to a forked repository on a new branch but must be imported in Go as if they were coming from official repositories. It is a tedious work to manage this workflow.
What is the new behavior?
The new behavior is to simplify the development of contributions in Flogo environment.
Especially, it adds following features :
flogo ensurecommand, a-devswitch enables the creation of symbolic links from vendor to pkg for explicit constraints in Gopkg.toml.For instance, the following constraint:
will remove the $APP_HOME/src/APP_NAME/vendor/github.com/TIBCOSoftware/flogo-contrib directory and replace it by a symbolic link to $APP_HOME/pkg/dep/sources/https---github.com-alternate-account-flogo--contrib.
Whereas the original $APP_HOME/src/APP_NAME/vendor/github.com/TIBCOSoftware/flogo-contrib directory which is just a copy of its counterpart in $APP_HOME/pkg with the right branch/version copied, the link points to a full Git working directory using the right branch/version too.
This is easier to manage updates to be commited and pushed to the fork in a single place.
flogo installcommand, new flags are defined:-sto specify an alternate source in a [[constraint]] of Gopkg.toml file-uto force the update of a [[constraint]] in Gopkg.toml file if it already exists in Gopkg.lock file (currently it is ignored and a message asks to add it manually in the file)-oto create an [[override]] instead of a [[constraint]] of Gopkg.toml fileFor instance:
will create the following sections:
Once the alternate configuration is set in Gopkg.toml, a call to
flogo ensure -devwill prepare the application for development mode.How to install to test?
and to switch back to the official Flogo CLI, simply run: