Skip to content

Commit

Permalink
Merge pull request #122 from unclejack/release_changes
Browse files Browse the repository at this point in the history
document release process changes
  • Loading branch information
unclejack authored Apr 18, 2017
2 parents 4d512de + ad3273a commit 58f7d5a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
20 changes: 15 additions & 5 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@
TBD

# Manual releases
1. Set BUILD_VERSION, e.g., 1.0.0-beta.3. Set or update the following variables under script/build.sh. Merge via PR to appropriate branch.
1. Check out the right branch and the right commit. This is necessary
when not releasing from the HEAD of master.

2. Tag the right commit and push it to GitHub. This is mandatory if the
release isn't made from the HEAD of master.
```
git tag 1.0.1 3aba546aea1235
git push origin 1.0.1
```

3. Set BUILD_VERSION, e.g., 1.0.0-beta.3. Set or update the following variables under script/build.sh. Merge via PR to appropriate branch.

```
auth_proxy_version=${CONTIV_API_PROXY_VERSION:-"1.0.0-beta.3"}
Expand All @@ -12,21 +22,21 @@ TBD
docker_version=${CONTIV_DOCKER_VERSION:-1.12.6}
```

2. Build docker binary image. This would create a docker image contiv/install:$BUILD_VERSION. It also creates two release bundles - contiv-${BUILD_VETSION}.tgz and contiv-full-${BUILD_VERSION}.tgz. This version should be tested locally using a vagrant setup with release-test-* make targets.
4. Build docker binary image. This would create a docker image contiv/install:$BUILD_VERSION. It also creates two release bundles - contiv-${BUILD_VETSION}.tgz and contiv-full-${BUILD_VERSION}.tgz. This version should be tested locally using a vagrant setup with release-test-* make targets.

```
make build
make ansible-image
```

2. Execute ```./scripts/release.sh``` Creates a new release on GitHub.
5. Execute ```./scripts/release.sh``` Creates a new release on GitHub.

```
export GITHUB_USER=contiv
export GITHUB_TOKEN=<your token here>
./scripts/release.sh
```

3. Push image to docker hub
6. Push image to docker hub

```
docker login -u $docker_user -p $docker_password
Expand Down
14 changes: 13 additions & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
# BUILD_VERSION - new version being released
# GITHUB_USER - contiv
# GITHUB_TOKEN - your github token
# USE_RELEASE - if 0 or not set, will make a pre-release

cd -P -- "$(dirname -- "$0")"

if [ -z "$(which github-release)" ]; then
echo "Please install github-release before running this script"
echo "You may download a release from https://github.com/aktau/github-release/releases or run 'go get github.com/aktau/github-release' if you have Go installed"
exit 1
fi

if [ -z "$BUILD_VERSION" ]; then
echo "A release requires BUILD_VERSION to be defined"
exit 1
Expand All @@ -19,7 +27,11 @@ fi
if [ "$OLD_VERSION" != "none" ]; then
comparison="$OLD_VERSION..HEAD"
fi
pre_release="-p"

if [ "$USE_RELEASE" != "1" ]; then
echo "Making a pre-release..."
pre_release="-p"
fi

if [ "$OLD_VERSION" != "none" ]; then
changelog=$(git log $comparison --oneline --no-merges --reverse)
Expand Down

0 comments on commit 58f7d5a

Please sign in to comment.