From 4a65d83741fc252f8214b4d811e89550e68b36da Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Tue, 26 May 2015 16:12:44 -0500 Subject: [PATCH] maint: Codify a Vagrant-based release process * update Vagrantfile to modern Consul-style version * add `make release` for a one-shot command to get from fresh vagrant machine to a built release * add RELEASING.md to document details about the release process --- Makefile | 4 ++++ RELEASING.md | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Vagrantfile | 56 +++++++++++++++++++++++++++++---------------- 3 files changed, 105 insertions(+), 19 deletions(-) create mode 100644 RELEASING.md diff --git a/Makefile b/Makefile index c66d55778..e2725dbd3 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,10 @@ dev: generate quickdev: generate @TF_QUICKDEV=1 TF_DEV=1 sh -c "'$(CURDIR)/scripts/build.sh'" +release: updatedeps + gox -build-toolchain + @$(MAKE) bin + # test runs the unit tests and vets the code test: generate TF_ACC= go test $(TEST) $(TESTARGS) -timeout=30s -parallel=4 diff --git a/RELEASING.md b/RELEASING.md new file mode 100644 index 000000000..d32bb8775 --- /dev/null +++ b/RELEASING.md @@ -0,0 +1,64 @@ +# Releasing Terraform + +This document contains details about the Terraform release process. + +## Schedule + +Terraform currently has no fixed release schedule, the HashiCorp maintainers +can usually give a feel for roughly when the next release is planned. + +## Versioning + +As a pre-1.0 project, we use the MINOR and PATCH versions as follows: + + * a `MINOR` version increment indicates a release that may contain backwards + incompatible changes + * a `PATCH` version increment indicates a release that may contain bugfixes as + well as additive (backwards compatible) features and enhancements + +## Process + +For maintainer documentation purposes, here is the current release process: + +```sh +# Verify tests pass +make test + +# Prep release commit +export VERSION="vX.Y.Z" +# Edit CHANGELOG, adding current date to unreleased version header +# Edit version.go, setting VersionPrelease to empty string + +# Snapshot dependency information +godep save +mv Godeps/Godeps.json deps/$(echo $VERSION | sed 's/\./-/g').json +rm -rf Godeps + +# Make and tag release commit +git commit -a -m "${VERSION}" +git tag -m "${VERSION}" "${VERSION}" + +# Build release in Vagrant machine +vagrant destroy -f; vagrant up # Build a fresh VM for a clean build +vagrant ssh +cd /opt/gopath/src/github.com/hashicorp/terraform/ +make release + +# Zip and push release to bintray +export BINTRAY_API_KEY="..." +./scripts/dist "X.Y.Z" # no `v` prefix here + +# -- "Point of no return" -- +# -- Process can be aborted safely at any point before this -- + +# Push the release commit and tag +git push origin master +git push origin vX.Y.Z + +# Click "publish" on the release from the Bintray Web UI + +# -- Release is complete! -- + +# Make a follow-on commit to master restoring VersionPrerelease to "dev" and +setting up a new CHANGELOG section. +``` diff --git a/Vagrantfile b/Vagrantfile index 687bc09af..3017ff58c 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -5,34 +5,52 @@ VAGRANTFILE_API_VERSION = "2" $script = <