|
1 | 1 | # Building
|
2 | 2 |
|
3 |
| -Mutagen is *not* `go get`able for end-users because it needs to cross-compile |
4 |
| -agent binaries for remote platforms and generate a bundle of these binaries. In |
5 |
| -general, users should download the release builds from the |
6 |
| -[releases page](https://github.com/mutagen-io/mutagen/releases/latest). |
7 |
| - |
8 |
| -Mutagen can, however, be built locally for testing and development. Mutagen |
| 3 | +Mutagen's build is slightly unique because it needs to cross-compile agent |
| 4 | +binaries for remote platforms (with cgo support in the case of macOS) and then |
| 5 | +generate a bundle of these binaries to ship alongside the Mutagen CLI. As such, |
| 6 | +using `go get` or `go install` to acquire Mutagen will result in an incomplete |
| 7 | +installation, and users should instead download the release builds from the |
| 8 | +[releases page](https://github.com/mutagen-io/mutagen/releases/latest) or |
| 9 | +[install Mutagen](https://mutagen.io/documentation/introduction/installation) |
| 10 | +via [Homebrew](https://brew.sh/). |
| 11 | + |
| 12 | +However, Mutagen can be built locally for testing and development. Mutagen |
9 | 13 | relies on the Go toolchain's module support, so make sure that you have Go
|
10 | 14 | module support enabled.
|
11 | 15 |
|
12 | 16 | Individual Mutagen executables can be built normally using the Go toolchain, but
|
13 |
| -a script is provided to manage cross-compiled builds and agent bundle creation. |
14 |
| -To see information about the build script, run: |
| 17 | +a script is provided to ensure a normalized build, manage cross-compiled builds |
| 18 | +and agent bundle creation, and perform code signing on macOS. To see information |
| 19 | +about the build script, run: |
15 | 20 |
|
16 | 21 | go run scripts/build.go --help
|
17 | 22 |
|
18 | 23 | The build script can do four different types of builds: `local` (with support
|
19 |
| -for the local system only), `slim` (with support for a selection of common |
20 |
| -platforms used in testing), `release` (used for generating complete release |
21 |
| -artifacts), and `release-slim` (used for generating complete release artifacts |
22 |
| -for a selection of common platforms used in testing). macOS is currently the |
23 |
| -only platform that supports doing `release` builds, because the macOS binaries |
24 |
| -require cgo support for file monitoring. |
| 24 | +for the local system only), `slim` (the default - with support for a selection |
| 25 | +of common platforms used in testing), `release` (used for generating complete |
| 26 | +release artifacts), and `release-slim` (used for generating complete release |
| 27 | +artifacts for a selection of common platforms used in testing). macOS is |
| 28 | +currently the only platform that supports doing `release` builds, because the |
| 29 | +macOS binaries require cgo support for filesystem monitoring. |
25 | 30 |
|
26 | 31 | All artifacts from the build are placed in a `build` directory at the root of
|
27 | 32 | the Mutagen source tree. As a convenience, artifacts built for the current
|
|
0 commit comments