Quick Start
Checkout chezmoi:Building with Make
chezmoi can be built with GNU make, assuming you have the Go toolchain installed. Runningmake will build a chezmoi binary in the current directory for the host OS and architecture. To embed version information in the binary and control installation the following variables are available:
| Variable | Example | Purpose |
|---|---|---|
$VERSION | v2.0.0 | Set version |
$COMMIT | 3895680a… | Set the git commit at which the code was built |
$DATE | 2019-11-23T18:29:25Z | The time of the build |
$BUILT_BY | homebrew | The packaging system performing the build |
$PREFIX | /usr | Installation prefix |
$DESTDIR | install-root | Fake installation root |
make install will install the chezmoi binary in ${DESTDIR}${PREFIX}/bin.
Build Targets
Default Build
Build for the current platform:Build from Git Working Copy
Build with embedded version information from git:Cross-Compilation
Build for all supported platforms:Test Builds
Run a set of smoke tests, including cross-compilation, tests, and linting:Shell Configuration
If you use These can be avoided by running tests with
fish as your primary shell, you may get warnings from Fish during tests:SHELL=bash or SHELL=zsh: