github.com/22Acacia/terraform@v0.6.5-0.20160105010053-c57aae34c157/BUILDING.md (about) 1 # Building Terraform 2 3 This document contains details about the process for building binaries for 4 Terraform. 5 6 ## Versioning 7 8 As a pre-1.0 project, we use the MINOR and PATCH versions as follows: 9 10 * a `MINOR` version increment indicates a release that may contain backwards 11 incompatible changes 12 * a `PATCH` version increment indicates a release that may contain bugfixes as 13 well as additive (backwards compatible) features and enhancements 14 15 ## Process 16 17 If only need to build binaries for the platform you're running (Windows, Linux, 18 Mac OS X etc..), you can follow the instructions in the README for [Developing 19 Terraform][1]. 20 21 The guide below outlines the steps HashiCorp takes to build the official release 22 binaries for Terraform. This process will generate a set of binaries for each supported 23 platform, using the [gox](https://github.com/mitchellh/gox) tool. 24 25 A Vagrant virtual machine is used to provide a consistent environment with 26 the pre-requisite tools in place. The specifics of this VM are defined in the 27 [Vagrantfile](Vagrantfile). 28 29 30 ```sh 31 # clone the repository if needed 32 git clone https://github.com/hashicorp/terraform.git 33 cd terraform 34 35 # Spin up a fresh build VM 36 vagrant destroy -f 37 vagrant up 38 vagrant ssh 39 40 # The Vagrantfile installs Go and configures the $GOPATH at /opt/gopath 41 # The current "terraform" directory is then sync'd into the gopath 42 cd /opt/gopath/src/github.com/hashicorp/terraform/ 43 44 # Fetch dependencies 45 make updatedeps 46 47 # Verify unit tests pass 48 make test 49 50 # Build the release 51 # This generates binaries for each platform and places them in the pkg folder 52 make release 53 ``` 54 55 After running these commands, you should have binaries for all supported 56 platforms in the `pkg` folder. 57 58 59 [1]: https://github.com/hashicorp/terraform#developing-terraform