Building an application
$ tt build [PATH] [--spec SPEC_FILE_PATH]
tt build builds a Tarantool application locally.
Path to a .rockspec file to use for the current build
The PATH argument should contain the path to the application directory
(that is, to the build source). The default path is . (current
directory).
The application directory must contain a .rockspec file to use for the
build. If there is more than one .rockspec file in the application
directory, specify the one to use in the --spec argument.
tt build builds an application with the tt rocks make command. It
downloads the application dependencies into the .rocks directory,
making the application ready to run locally.
In addition to building the application with LuaRocks, tt build can
execute pre-build and post-build scripts. These scripts should
contain steps to execute right before and after building the
application. These files must be named tt.pre-build and
tt.post-build correspondingly and located in the application
directory.
tt.pre-build is helpful when your application depends on closed-source
rocks, or if the build should contain rocks from a project added as a
submodule. You can install these dependencies using the pre-build
script before building. Example:
#!/bin/sh# The main purpose of this script is to build non-standard rocks modules.# The script will run before `tt rocks make` during application build.tt rocks make --chdir ./third_party/proj
tt.post-build is a script that runs after tt rocks make. The main
purpose of this script is to remove build artifacts from the final
package. Example:
#!/bin/sh# The main purpose of this script is to remove build artifacts from the resulting package.# The script will run after `tt rocks make` during application build.rm -rf third_partyrm -rf node_modulesrm -rf doc
-
Build the application
app1from its directory:$ tt build -
Build the application
app1from thesimple_appdirectory inside the current directory:$ tt build simple_app -
Build the application
app1from its directory explicitly specifying the rockspec file to use:$ tt build --spec app1-scm-1.rockspec