Build from source
Build command launcher from source
Why does the binary name matter?
Command launcher is designed for both enterprise and individual usage. According to your context, you might want to call it differently. For example, at Criteo, we call it “Criteo Dev Toolkit”. The binary name is used for several default configurations, for example, command launcher home $HOME/.[APP_NAME]
, additional resources environment prefix [APP_NAME]_
, etc.
The default pre-built binary is call cola
(Command Launcher), which means that the default home folder is $HOME/.cola
and the resources environment variables are all starts with COLA_
.
Another pre-built binary is called cdt
(Criteo Dev Toolkit), its home folder will be $HOME/.cdt
, and its commands can access the resource environment variables with both prefix COLA_
and CDT_
.
For compatibility concern, we highly recommend to reference resources in your command with prefix
COLA_
To use a different name, you need to build command launcher from source and pass the desired short and long name to the build scripts.
Build from source
Requirements: golang >= 1.17
You can build the command launcher with your prefered name (in the example: Command Launcher
, a.k.a cola
).
go build -o cola -ldflags='-X main.version=dev -X main.appName=cola -X "main.appLongName=Command Launcher"' main.go
Or simply call the build.sh
scripts
./build.sh [version] [app name] [app long name]
Run tests
Run unit tests
go test -v ./...
Run all integration tests
./test/integration.sh
You can run one integration test by specify the name of the integration test file (without the .sh extension). The integration tests can be found in test/integration
folder, for example:
./test/integration.sh test-remote