blob: ee39597a145ab5679dd2a3e369d466400a6185ba [file] [log] [blame]
Ray Milkey3c50bd42016-12-01 14:28:15 -08001#!/bin/bash
2# -----------------------------------------------------------------------------
3# Builds an ONOS release
4# -----------------------------------------------------------------------------
5
6if [ $# -ne 3 ]; then
7 echo "Usage: onos-build-release version next-version branch"
8 echo "For example, to build rc2 on the 1.8 branch - onos-build-release onos-1.8 1.8.0-rc2 1.8.0-SNAPSHOT"
9 exit 1
10fi
11
12BRANCH=$1
13VERSION=$2
14NEXT_VERSION=$3
15
16set -e
17set -x
18
19# Check that environment setup is correct
20onos-release-prerequisites
21
22# Block commits to Gerrit
23ssh -p 29418 gerrit.onosproject.org projectlock lock onos ${BRANCH}
24
25# Prepare the build tree
26onos-prepare-release $VERSION $BRANCH "onos-build-and-upload $VERSION $NEXT_VERSION $BRANCH"
27
28# Unblock commits
29ssh -p 29418 gerrit.onosproject.org projectlock unlock onos ${BRANCH}
30