github.com/blacked/terraform@v0.6.2-0.20150806163846-669c4ad71586/RELEASING.md (about)

     1  # Releasing Terraform
     2  
     3  This document contains details about the Terraform release process.
     4  
     5  ## Schedule
     6  
     7  Terraform currently has no fixed release schedule, the HashiCorp maintainers
     8  can usually give a feel for roughly when the next release is planned.
     9  
    10  ## Versioning
    11  
    12  As a pre-1.0 project, we use the MINOR and PATCH versions as follows:
    13  
    14   * a `MINOR` version increment indicates a release that may contain backwards
    15     incompatible changes
    16   * a `PATCH` version increment indicates a release that may contain bugfixes as
    17     well as additive (backwards compatible) features and enhancements
    18  
    19  ## Process
    20  
    21  For maintainer documentation purposes, here is the current release process:
    22  
    23  ```sh
    24  # Spin up a fresh build VM
    25  vagrant destroy -f
    26  vagrant up
    27  vagrant ssh
    28  cd /opt/gopath/src/github.com/hashicorp/terraform/
    29  
    30  # Fetch dependencies
    31  make updatedeps
    32  
    33  # Verify unit tests pass
    34  make test
    35  
    36  # Prep release commit
    37  export VERSION="vX.Y.Z"
    38  # Edit CHANGELOG.md, adding current date to unreleased version header
    39  # Edit version.go, setting VersionPrelease to empty string
    40  
    41  # Snapshot dependency information
    42  go get github.com/tools/godep
    43  godep save ./...
    44  cp Godeps/Godeps.json deps/$(echo $VERSION | sed 's/\./-/g').json
    45  
    46  # Make and tag release commit (skipping Godeps dir)
    47  git add CHANGELOG.md terraform/version.go deps/
    48  git commit -a -m "${VERSION}"
    49  git tag -m "${VERSION}" "${VERSION}"
    50  
    51  # Build the release
    52  make release
    53  
    54  # Add Godeps for the archive
    55  git add Godeps
    56  
    57  # Make an archive with vendored dependencies
    58  stashName=$(git stash create)
    59  git archive -o terraform-$VERSION-src.tar.gz $stashName
    60  git reset --hard ${VERSION}
    61  
    62  # Zip and push release to bintray
    63  export BINTRAY_API_KEY="..."
    64  ./scripts/dist "X.Y.Z" # no `v` prefix here
    65  
    66  # -- "Point of no return" --
    67  # -- Process can be aborted safely at any point before this --
    68  
    69  # Push the release commit and tag
    70  git push origin master
    71  git push origin vX.Y.Z
    72  
    73  # Click "publish" on the release from the Bintray Web UI
    74  # Upload terraform-$VERSION-src.tar.gz as a file to the GitHub release.
    75  
    76  # -- Release is complete! --
    77  
    78  # Start release branch (to be used for reproducible builds and docs updates)
    79  git checkout -b release/$VERSION
    80  git push origin release/$VERSION
    81  
    82  # Clean up master
    83  git checkout master
    84  # Set VersionPrerelease to "dev"
    85  # Add new CHANGELOG section for next release
    86  git add -A
    87  git commit -m "release: clean up after ${VERSION}"
    88  ```