The following are instructions for setting up your machine for Flipt development.
Before starting, make sure you have the following installed:
- Clone this repo:
git clone https://github.com/markphelps/flipt
make setupto download dependencies
make testto execute the test suite
make devto build and run in development mode
make helpto see a full list of possible make commands
Flipt uses Go 1.12 with Go Modules enabled. To reliably build Flipt, make sure you clone it to a location outside of your
$GOPATH or set the environment variable
GO111MODULE=on. For more info see: https://github.com/golang/go/wiki/Modules#how-to-install-and-activate-module-support.
Once you have Vagrant and Virtual Box installed you can change into either the
build/centos directories and run
This will provision a VM that installs the necessary dev dependencies and runs the Flipt test suite.
Once the provisioning process is complete, run:
$ vagrant ssh $ cd ~/app/flipt $ make dev
This will run Flipt in development mode inside your VM.
Configuration for running when developing Flipt can be found at
./config/local.yml. To run Flipt with this configuration, run:
Changing certain types of files such as the protobuf, ui or documentation files require re-building before they will be picked up in new versions of the binary.
Updating .proto Files
flipt.proto, you'll need to run
make proto. This will regenerate the following files:
make assets will regenerate the embedded assets (ui, api documentation) so that the next time
make dev is run they will be included.
The ui/README.md has more information on how to build the UI and also how to run it locally during development.